mirror of
https://github.com/portainer/portainer.git
synced 2025-07-31 03:09:44 +02:00
fix(endpoints): add the ability to update TLS for an existing endpoint (#784)
This commit is contained in:
parent
44e48423ed
commit
abc929824c
7 changed files with 90 additions and 45 deletions
|
@ -24,13 +24,14 @@ angular.module('portainer.services')
|
|||
if (endpointParams.type && endpointParams.URL) {
|
||||
query.URL = endpointParams.type === 'local' ? ("unix://" + endpointParams.URL) : ("tcp://" + endpointParams.URL);
|
||||
}
|
||||
|
||||
var deferred = $q.defer();
|
||||
Endpoints.update({id: id}, query).$promise
|
||||
FileUploadService.uploadTLSFilesForEndpoint(id, endpointParams.TLSCACert, endpointParams.TLSCert, endpointParams.TLSKey)
|
||||
.then(function success() {
|
||||
return FileUploadService.uploadTLSFilesForEndpoint(id, endpointParams.TLSCAFile, endpointParams.TLSCertFile, endpointParams.TLSKeyFile);
|
||||
deferred.notify({upload: false});
|
||||
return Endpoints.update({id: id}, query).$promise;
|
||||
})
|
||||
.then(function success(data) {
|
||||
deferred.notify({upload: false});
|
||||
deferred.resolve(data);
|
||||
})
|
||||
.catch(function error(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue