1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

refactor(ux): rename deploymentInProgress variable (#1385)

This commit is contained in:
Anthony Lapenna 2017-11-12 22:39:12 +01:00 committed by GitHub
parent d68708add7
commit efc3154617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 130 additions and 130 deletions

View file

@ -21,7 +21,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
$scope.state = {
formValidationError: '',
deploymentInProgress: false
actionInProgress: false
};
$scope.refreshSlider = function () {
@ -580,7 +580,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
return;
}
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
var config = prepareConfiguration();
createContainer(config, accessControlData);
})
@ -606,7 +606,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
Notifications.error('Failure', err, 'Unable to create container');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
});
}

View file

@ -112,9 +112,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !config.Image || (!formValues.Registry && fromContainer)" ng-click="create()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Deploy the container</span>
<span ng-show="state.deploymentInProgress">Deployment in progress...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !config.Image || (!formValues.Registry && fromContainer)" ng-click="create()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Deploy the container</span>
<span ng-show="state.actionInProgress">Deployment in progress...</span>
</button>
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
<span ng-if="fromContainerMultipleNetworks" style="margin-left: 10px">

View file

@ -12,7 +12,7 @@ function ($q, $scope, $state, PluginService, Notifications, NetworkService, Labe
$scope.state = {
formValidationError: '',
deploymentInProgress: false
actionInProgress: false
};
$scope.availableNetworkDrivers = [];
@ -99,7 +99,7 @@ function ($q, $scope, $state, PluginService, Notifications, NetworkService, Labe
return;
}
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
NetworkService.create(networkConfiguration)
.then(function success(data) {
var networkIdentifier = data.Id;
@ -114,7 +114,7 @@ function ($q, $scope, $state, PluginService, Notifications, NetworkService, Labe
Notifications.error('Failure', err, 'An error occured during network creation');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -128,9 +128,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !config.Name" ng-click="create()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Create the network</span>
<span ng-show="state.deploymentInProgress">Creating network...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !config.Name" ng-click="create()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Create the network</span>
<span ng-show="state.actionInProgress">Creating network...</span>
</button>
<i id="createResourceSpinner" class="fa fa-cog fa-spin" style="margin-left: 5px; display: none;"></i>
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>

View file

@ -4,7 +4,7 @@ function ($scope, $state, RegistryService, Notifications) {
$scope.state = {
RegistryType: 'quay',
deploymentInProgress: false
actionInProgress: false
};
$scope.formValues = {
@ -34,7 +34,7 @@ function ($scope, $state, RegistryService, Notifications) {
var username = $scope.formValues.Username;
var password = $scope.formValues.Password;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
RegistryService.createRegistry(registryName, registryURL, authentication, username, password)
.then(function success(data) {
Notifications.success('Registry successfully created');
@ -44,7 +44,7 @@ function ($scope, $state, RegistryService, Notifications) {
Notifications.error('Failure', err, 'Unable to create registry');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};
}]);

View file

@ -107,9 +107,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.Name || !formValues.URL || (formValues.Authentication && (!formValues.Username || !formValues.Password))" ng-click="addRegistry()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Add registry</span>
<span ng-show="state.deploymentInProgress">Adding registry...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.Name || !formValues.URL || (formValues.Authentication && (!formValues.Username || !formValues.Password))" ng-click="addRegistry()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Add registry</span>
<span ng-show="state.actionInProgress">Adding registry...</span>
</button>
</div>
</div>

View file

@ -12,7 +12,7 @@ function ($scope, $state, Notifications, SecretService, LabelHelper, Authenticat
$scope.state = {
formValidationError: '',
deploymentInProgress: false
actionInProgress: false
};
$scope.addLabel = function() {
@ -65,7 +65,7 @@ function ($scope, $state, Notifications, SecretService, LabelHelper, Authenticat
return;
}
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
var secretConfiguration = prepareConfiguration();
SecretService.create(secretConfiguration)
.then(function success(data) {
@ -81,7 +81,7 @@ function ($scope, $state, Notifications, SecretService, LabelHelper, Authenticat
Notifications.error('Failure', err, 'Unable to create secret');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};
}]);

View file

@ -75,9 +75,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.Name || !formValues.Data" ng-click="create()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Create the secret</span>
<span ng-show="state.deploymentInProgress">Creating secret...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.Name || !formValues.Data" ng-click="create()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Create the secret</span>
<span ng-show="state.actionInProgress">Creating secret...</span>
</button>
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
</div>

View file

@ -40,7 +40,7 @@ function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, C
$scope.state = {
formValidationError: '',
deploymentInProgress: false
actionInProgress: false
};
$scope.refreshSlider = function () {
@ -367,7 +367,7 @@ function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, C
Notifications.error('Failure', err, 'Unable to create service');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
}
@ -393,7 +393,7 @@ function ($q, $scope, $state, $timeout, Service, ServiceHelper, ConfigService, C
return;
}
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
var config = prepareConfiguration();
createNewService(config, accessControlData);
};

View file

@ -107,9 +107,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.Image" ng-click="create()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Create the service</span>
<span ng-show="state.deploymentInProgress">Creating service...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.Image" ng-click="create()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Create the service</span>
<span ng-show="state.actionInProgress">Creating service...</span>
</button>
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
</div>

View file

@ -19,7 +19,7 @@ function ($scope, $state, $document, StackService, CodeMirrorService, Authentica
$scope.state = {
Method: 'editor',
formValidationError: '',
deploymentInProgress: false
actionInProgress: false
};
$scope.addEnvironmentVariable = function() {
@ -74,7 +74,7 @@ function ($scope, $state, $document, StackService, CodeMirrorService, Authentica
return;
}
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
createStack(name)
.then(function success(data) {
Notifications.success('Stack successfully deployed');
@ -92,7 +92,7 @@ function ($scope, $state, $document, StackService, CodeMirrorService, Authentica
Notifications.error('Failure', err, 'Unable to apply resource control on the stack');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -167,12 +167,12 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || (state.Method === 'editor' && !formValues.StackFileContent)
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || (state.Method === 'editor' && !formValues.StackFileContent)
|| (state.Method === 'upload' && !formValues.StackFile)
|| (state.Method === 'repository' && (!formValues.RepositoryURL || !formValues.RepositoryPath))
|| !formValues.Name" ng-click="deployStack()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Deploy the stack</span>
<span ng-show="state.deploymentInProgress">Deployment in progress...</span>
|| !formValues.Name" ng-click="deployStack()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Deploy the stack</span>
<span ng-show="state.actionInProgress">Deployment in progress...</span>
</button>
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
</div>

View file

@ -10,7 +10,7 @@ function ($q, $scope, $state, VolumeService, PluginService, ResourceControlServi
$scope.state = {
formValidationError: '',
deploymentInProgress: false
actionInProgress: false
};
$scope.availableVolumeDrivers = [];
@ -49,7 +49,7 @@ function ($q, $scope, $state, VolumeService, PluginService, ResourceControlServi
return;
}
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
VolumeService.createVolume(volumeConfiguration)
.then(function success(data) {
var volumeIdentifier = data.Id;
@ -64,7 +64,7 @@ function ($q, $scope, $state, VolumeService, PluginService, ResourceControlServi
Notifications.error('Failure', err, 'An error occured during volume creation');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -71,9 +71,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-click="create()" ng-disabled="state.deploymentInProgress" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Create the volume</span>
<span ng-show="state.deploymentInProgress">Creating volume...</span>
<button type="button" class="btn btn-primary btn-sm" ng-click="create()" ng-disabled="state.actionInProgress" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Create the volume</span>
<span ng-show="state.actionInProgress">Creating volume...</span>
</button>
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
</div>

View file

@ -53,9 +53,9 @@
<!-- !endpoint-security -->
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !endpoint.Name || !endpoint.URL || (endpoint.TLS && ((endpoint.TLSVerify && !formValues.TLSCACert) || (endpoint.TLSClientCert && (!formValues.TLSCert || !formValues.TLSKey))))" ng-click="updateEndpoint()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Update endpoint</span>
<span ng-show="state.deploymentInProgress">Updating endpoint...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !endpoint.Name || !endpoint.URL || (endpoint.TLS && ((endpoint.TLSVerify && !formValues.TLSCACert) || (endpoint.TLSClientCert && (!formValues.TLSCert || !formValues.TLSKey))))" ng-click="updateEndpoint()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Update endpoint</span>
<span ng-show="state.actionInProgress">Updating endpoint...</span>
</button>
<a type="button" class="btn btn-default btn-sm" ui-sref="endpoints">Cancel</a>
</div>

View file

@ -8,7 +8,7 @@ function ($scope, $state, $transition$, $filter, EndpointService, Notifications)
$scope.state = {
uploadInProgress: false,
deploymentInProgress: false
actionInProgress: false
};
$scope.formValues = {
@ -36,14 +36,14 @@ function ($scope, $state, $transition$, $filter, EndpointService, Notifications)
type: $scope.endpointType
};
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
EndpointService.updateEndpoint(endpoint.Id, endpointParams)
.then(function success(data) {
Notifications.success('Endpoint updated', $scope.endpoint.Name);
$state.go('endpoints');
}, function error(err) {
Notifications.error('Failure', err, 'Unable to update endpoint');
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
}, function update(evt) {
if (evt.upload) {
$scope.state.uploadInProgress = evt.upload;

View file

@ -65,9 +65,9 @@
<!-- actions -->
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.Name || !formValues.URL || (formValues.TLS && ((formValues.TLSVerify && !formValues.TLSCACert) || (formValues.TLSClientCert && (!formValues.TLSCert || !formValues.TLSKey))))" ng-click="addEndpoint()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Add endpoint</span>
<span ng-show="state.deploymentInProgress">Creating endpoint...</span>
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.Name || !formValues.URL || (formValues.TLS && ((formValues.TLSVerify && !formValues.TLSCACert) || (formValues.TLSClientCert && (!formValues.TLSCert || !formValues.TLSKey))))" ng-click="addEndpoint()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Add endpoint</span>
<span ng-show="state.actionInProgress">Creating endpoint...</span>
</button>
</div>

View file

@ -5,7 +5,7 @@ function ($scope, $state, $filter, EndpointService, EndpointProvider, Notificati
uploadInProgress: false,
selectedItemCount: 0,
pagination_count: Pagination.getPaginationCount('endpoints'),
deploymentInProgress: false
actionInProgress: false
};
$scope.sortType = 'Name';
$scope.sortReverse = true;
@ -60,13 +60,13 @@ function ($scope, $state, $filter, EndpointService, EndpointProvider, Notificati
var TLSCertFile = TLSSkipClientVerify ? null : securityData.TLSCert;
var TLSKeyFile = TLSSkipClientVerify ? null : securityData.TLSKey;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
EndpointService.createRemoteEndpoint(name, URL, PublicURL, TLS, TLSSkipVerify, TLSSkipClientVerify, TLSCAFile, TLSCertFile, TLSKeyFile).then(function success(data) {
Notifications.success('Endpoint created', name);
$state.reload();
}, function error(err) {
$scope.state.uploadInProgress = false;
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
Notifications.error('Failure', err, 'Unable to create endpoint');
}, function update(evt) {
if (evt.upload) {

View file

@ -28,9 +28,9 @@
<!-- !tag-note -->
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.Image" ng-click="pullImage()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Pull the image</span>
<span ng-show="state.deploymentInProgress">Download in progress...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.Image" ng-click="pullImage()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Pull the image</span>
<span ng-show="state.actionInProgress">Download in progress...</span>
</button>
</div>
</div>

View file

@ -3,7 +3,7 @@ angular.module('images', [])
function ($scope, $state, ImageService, Notifications, Pagination, ModalService) {
$scope.state = {
pagination_count: Pagination.getPaginationCount('images'),
deploymentInProgress: false,
actionInProgress: false,
selectedItemCount: 0
};
@ -45,7 +45,7 @@ function ($scope, $state, ImageService, Notifications, Pagination, ModalService)
var image = $scope.formValues.Image;
var registry = $scope.formValues.Registry;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
ImageService.pullImage(image, registry, false)
.then(function success(data) {
Notifications.success('Image successfully pulled', image);
@ -55,7 +55,7 @@ function ($scope, $state, ImageService, Notifications, Pagination, ModalService)
Notifications.error('Failure', err, 'Unable to pull image');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -64,9 +64,9 @@
<!-- actions -->
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || formValues.Password.length < 8 || formValues.Password !== formValues.ConfirmPassword" ng-click="createAdminUser()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress"><i class="fa fa-user-plus" aria-hidden="true"></i> Create user</span>
<span ng-show="state.deploymentInProgress">Creating user...</span>
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || formValues.Password.length < 8 || formValues.Password !== formValues.ConfirmPassword" ng-click="createAdminUser()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress"><i class="fa fa-user-plus" aria-hidden="true"></i> Create user</span>
<span ng-show="state.actionInProgress">Creating user...</span>
</button>
</div>
</div>

View file

@ -11,14 +11,14 @@ function ($scope, $state, $sanitize, Notifications, Authentication, StateManager
};
$scope.state = {
deploymentInProgress: false
actionInProgress: false
};
$scope.createAdminUser = function() {
var username = $sanitize($scope.formValues.Username);
var password = $sanitize($scope.formValues.Password);
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
UserService.initAdministrator(username, password)
.then(function success() {
return Authentication.login(username, password);
@ -45,7 +45,7 @@ function ($scope, $state, $sanitize, Notifications, Authentication, StateManager
Notifications.error('Failure', err, 'Unable to create administrator user');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -66,9 +66,9 @@
<!-- actions -->
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress" ng-click="createLocalEndpoint()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress"><i class="fa fa-bolt" aria-hidden="true"></i> Connect</span>
<span ng-show="state.deploymentInProgress">Connecting...</span>
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress" ng-click="createLocalEndpoint()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress"><i class="fa fa-bolt" aria-hidden="true"></i> Connect</span>
<span ng-show="state.actionInProgress">Connecting...</span>
</button>
</div>
</div>
@ -186,9 +186,9 @@
<!-- actions -->
<div class="form-group">
<div class="col-sm-12">
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.Name || !formValues.URL || (formValues.TLS && ((formValues.TLSVerify && !formValues.TLSCACert) || (!formValues.TLSSKipClientVerify && (!formValues.TLSCert || !formValues.TLSKey))))" ng-click="createRemoteEndpoint()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress"><i class="fa fa-bolt" aria-hidden="true"></i> Connect</span>
<span ng-show="state.deploymentInProgress">Connecting...</span>
<button type="submit" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.Name || !formValues.URL || (formValues.TLS && ((formValues.TLSVerify && !formValues.TLSCACert) || (!formValues.TLSSKipClientVerify && (!formValues.TLSCert || !formValues.TLSKey))))" ng-click="createRemoteEndpoint()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress"><i class="fa fa-bolt" aria-hidden="true"></i> Connect</span>
<span ng-show="state.actionInProgress">Connecting...</span>
</button>
</div>
</div>

View file

@ -10,7 +10,7 @@ function ($scope, $state, EndpointService, StateManager, EndpointProvider, Notif
$scope.state = {
uploadInProgress: false,
deploymentInProgress: false
actionInProgress: false
};
$scope.formValues = {
@ -30,7 +30,7 @@ function ($scope, $state, EndpointService, StateManager, EndpointProvider, Notif
var URL = 'unix:///var/run/docker.sock';
var endpointID = 1;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
EndpointService.createLocalEndpoint(name, URL, false, true)
.then(function success(data) {
endpointID = data.Id;
@ -45,7 +45,7 @@ function ($scope, $state, EndpointService, StateManager, EndpointProvider, Notif
EndpointService.deleteEndpoint(endpointID);
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};
@ -61,7 +61,7 @@ function ($scope, $state, EndpointService, StateManager, EndpointProvider, Notif
var TLSKeyFile = TLSSKipClientVerify ? null : $scope.formValues.TLSKey;
var endpointID = 1;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
EndpointService.createRemoteEndpoint(name, URL, PublicURL, TLS, TLSSkipVerify, TLSSKipClientVerify, TLSCAFile, TLSCertFile, TLSKeyFile)
.then(function success(data) {
endpointID = data.Id;
@ -76,7 +76,7 @@ function ($scope, $state, EndpointService, StateManager, EndpointProvider, Notif
EndpointService.deleteEndpoint(endpointID);
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};
}]);

View file

@ -56,9 +56,9 @@
<!-- !authentication-credentials -->
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || dockerhub.Authentication && (!dockerhub.Username || !dockerhub.Password)" ng-click="updateDockerHub()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Update</span>
<span ng-show="state.deploymentInProgress">Updating DockerHub settings...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || dockerhub.Authentication && (!dockerhub.Username || !dockerhub.Password)" ng-click="updateDockerHub()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Update</span>
<span ng-show="state.actionInProgress">Updating DockerHub settings...</span>
</button>
</div>
</div>

View file

@ -5,14 +5,14 @@ function ($q, $scope, $state, RegistryService, DockerHubService, ModalService, N
$scope.state = {
selectedItemCount: 0,
pagination_count: Pagination.getPaginationCount('registries'),
deploymentInProgress: false
actionInProgress: false
};
$scope.sortType = 'Name';
$scope.sortReverse = true;
$scope.updateDockerHub = function() {
var dockerhub = $scope.dockerhub;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
DockerHubService.update(dockerhub)
.then(function success(data) {
Notifications.success('DockerHub registry updated');
@ -21,7 +21,7 @@ function ($q, $scope, $state, RegistryService, DockerHubService, ModalService, N
Notifications.error('Failure', err, 'Unable to update DockerHub details');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -64,9 +64,9 @@
<!-- !authentication-credentials -->
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !registry.Name || !registry.URL || (registry.Authentication && (!registry.Username || !registry.Password))" ng-click="updateRegistry()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Update registry</span>
<span ng-show="state.deploymentInProgress">Updating registry...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !registry.Name || !registry.URL || (registry.Authentication && (!registry.Username || !registry.Password))" ng-click="updateRegistry()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Update registry</span>
<span ng-show="state.actionInProgress">Updating registry...</span>
</button>
<a type="button" class="btn btn-default btn-sm" ui-sref="registries">Cancel</a>
</div>

View file

@ -3,12 +3,12 @@ angular.module('registry', [])
function ($scope, $state, $transition$, $filter, RegistryService, Notifications) {
$scope.state = {
deploymentInProgress: false
actionInProgress: false
};
$scope.updateRegistry = function() {
var registry = $scope.registry;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
RegistryService.updateRegistry(registry)
.then(function success(data) {
Notifications.success('Registry successfully updated');
@ -18,7 +18,7 @@ function ($scope, $state, $transition$, $filter, RegistryService, Notifications)
Notifications.error('Failure', err, 'Unable to update registry');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -110,9 +110,9 @@
<!-- actions -->
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-click="saveApplicationSettings()" ng-disabled="state.deploymentInProgress" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Save settings</span>
<span ng-show="state.deploymentInProgress">Saving...</span>
<button type="button" class="btn btn-primary btn-sm" ng-click="saveApplicationSettings()" ng-disabled="state.actionInProgress" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Save settings</span>
<span ng-show="state.actionInProgress">Saving...</span>
</button>
</div>
</div>

View file

@ -3,7 +3,7 @@ angular.module('settings', [])
function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_TEMPLATES_URL) {
$scope.state = {
deploymentInProgress: false
actionInProgress: false
};
$scope.formValues = {
@ -49,7 +49,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
settings.AllowBindMountsForRegularUsers = !$scope.formValues.restrictBindMounts;
settings.AllowPrivilegedModeForRegularUsers = !$scope.formValues.restrictPrivilegedMode;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
updateSettings(settings, false);
};
@ -72,7 +72,7 @@ function ($scope, $state, Notifications, SettingsService, StateManager, DEFAULT_
Notifications.error('Failure', err, 'Unable to update settings');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
}

View file

@ -240,9 +240,9 @@
<!-- actions -->
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-click="saveSettings()" ng-disabled="state.deploymentInProgress" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Save settings</span>
<span ng-show="state.deploymentInProgress">Saving...</span>
<button type="button" class="btn btn-primary btn-sm" ng-click="saveSettings()" ng-disabled="state.actionInProgress" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Save settings</span>
<span ng-show="state.actionInProgress">Saving...</span>
</button>
</div>
</div>

View file

@ -7,7 +7,7 @@ function ($q, $scope, Notifications, SettingsService, FileUploadService) {
failedConnectivityCheck: false,
uploadInProgress: false,
connectivityCheckInProgress: false,
deploymentInProgress: false
actionInProgress: false
};
$scope.formValues = {
@ -57,7 +57,7 @@ function ($q, $scope, Notifications, SettingsService, FileUploadService) {
var uploadRequired = ($scope.LDAPSettings.TLSConfig.TLS || $scope.LDAPSettings.StartTLS) && !$scope.LDAPSettings.TLSConfig.TLSSkipVerify;
$scope.state.uploadInProgress = uploadRequired;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
$q.when(!uploadRequired || FileUploadService.uploadLDAPTLSFiles(TLSCAFile, null, null))
.then(function success(data) {
return SettingsService.update(settings);
@ -70,7 +70,7 @@ function ($q, $scope, Notifications, SettingsService, FileUploadService) {
})
.finally(function final() {
$scope.state.uploadInProgress = false;
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -72,9 +72,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-sm btn-primary" ng-disabled="state.deploymentInProgress" ng-click="deployStack()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Update the stack</span>
<span ng-show="state.deploymentInProgress">Deployment in progress...</span>
<button type="button" class="btn btn-sm btn-primary" ng-disabled="state.actionInProgress" ng-click="deployStack()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Update the stack</span>
<span ng-show="state.actionInProgress">Deployment in progress...</span>
</button>
</div>
</div>

View file

@ -3,7 +3,7 @@ angular.module('stack', [])
function ($q, $scope, $state, $stateParams, $document, StackService, NodeService, ServiceService, TaskService, ServiceHelper, CodeMirrorService, Notifications, FormHelper) {
$scope.state = {
deploymentInProgress: false
actionInProgress: false
};
$scope.deployStack = function () {
@ -12,7 +12,7 @@ function ($q, $scope, $state, $stateParams, $document, StackService, NodeService
var stackFile = $scope.editor.getValue();
var env = FormHelper.removeInvalidEnvVars($scope.stack.Env);
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
StackService.updateStack($scope.stack.Id, stackFile, env)
.then(function success(data) {
Notifications.success('Stack successfully deployed');
@ -22,7 +22,7 @@ function ($q, $scope, $state, $stateParams, $document, StackService, NodeService
Notifications.error('Failure', err, 'Unable to create stack');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -49,9 +49,9 @@
<!-- !team-leaders -->
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !state.validName || formValues.Name === ''" ng-click="addTeam()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create team</span>
<span ng-show="state.deploymentInProgress">Creating team...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !state.validName || formValues.Name === ''" ng-click="addTeam()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create team</span>
<span ng-show="state.actionInProgress">Creating team...</span>
</button>
<span class="text-danger" ng-if="state.teamCreationError" style="margin: 5px;">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i> {{ state.teamCreationError }}

View file

@ -6,7 +6,7 @@ function ($q, $scope, $state, TeamService, UserService, TeamMembershipService, M
selectedItemCount: 0,
validName: false,
pagination_count: Pagination.getPaginationCount('teams'),
deploymentInProgress: false
actionInProgress: false
};
$scope.sortType = 'Name';
$scope.sortReverse = false;
@ -55,7 +55,7 @@ function ($q, $scope, $state, TeamService, UserService, TeamMembershipService, M
};
$scope.addTeam = function() {
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
$scope.state.teamCreationError = '';
var teamName = $scope.formValues.Name;
var leaderIds = [];
@ -72,7 +72,7 @@ function ($q, $scope, $state, TeamService, UserService, TeamMembershipService, M
Notifications.error('Failure', err, 'Unable to create team');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};

View file

@ -64,9 +64,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.name" ng-click="createTemplate()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Deploy the stack</span>
<span ng-show="state.deploymentInProgress">Deployment in progress...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.name" ng-click="createTemplate()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Deploy the stack</span>
<span ng-show="state.actionInProgress">Deployment in progress...</span>
</button>
<span class="text-danger" ng-if="state.formValidationError" style="margin-left: 5px;">{{ state.formValidationError }}</span>
</div>
@ -296,9 +296,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !formValues.network" ng-click="createTemplate()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress">Deploy the container</span>
<span ng-show="state.deploymentInProgress">Deployment in progress...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !formValues.network" ng-click="createTemplate()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress">Deploy the container</span>
<span ng-show="state.actionInProgress">Deployment in progress...</span>
</button>
<span class="small text-muted" style="margin-left: 10px" ng-if="globalNetworkCount === 0 && applicationState.endpoint.mode.provider === 'DOCKER_SWARM' && !state.formValidationError">
When using Swarm, we recommend deploying containers in a shared network. Looks like you don't have any shared network, head over the <a ui-sref="networks">networks view</a> to create one.

View file

@ -7,7 +7,7 @@ function ($scope, $q, $state, $transition$, $anchorScroll, $filter, ContainerSer
hideDescriptions: $transition$.params().hide_descriptions,
formValidationError: '',
showDeploymentSelector: false,
deploymentInProgress: false,
actionInProgress: false,
filters: {
Categories: '!',
Platform: '!',
@ -86,7 +86,7 @@ function ($scope, $q, $state, $transition$, $anchorScroll, $filter, ContainerSer
Notifications.error('Failure', err, err.msg);
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
}
@ -114,7 +114,7 @@ function ($scope, $q, $state, $transition$, $anchorScroll, $filter, ContainerSer
$state.go('stacks', {}, {reload: true});
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
}
@ -131,7 +131,7 @@ function ($scope, $q, $state, $transition$, $anchorScroll, $filter, ContainerSer
var template = $scope.state.selectedTemplate;
var templatesKey = $scope.templatesKey;
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
if (template.Type === 'stack') {
createStackFromTemplate(template, userId, accessControlData);
} else {

View file

@ -97,9 +97,9 @@
</div>
<div class="form-group">
<div class="col-sm-12">
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.deploymentInProgress || !state.validUsername || formValues.Username === '' || (AuthenticationMethod === 1 && formValues.Password === '') || (AuthenticationMethod === 1 && formValues.Password !== formValues.ConfirmPassword)" ng-click="addUser()" button-spinner="state.deploymentInProgress">
<span ng-hide="state.deploymentInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create user</span>
<span ng-show="state.deploymentInProgress">Creating user...</span>
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !state.validUsername || formValues.Username === '' || (AuthenticationMethod === 1 && formValues.Password === '') || (AuthenticationMethod === 1 && formValues.Password !== formValues.ConfirmPassword)" ng-click="addUser()" button-spinner="state.actionInProgress">
<span ng-hide="state.actionInProgress"><i class="fa fa-plus" aria-hidden="true"></i> Create user</span>
<span ng-show="state.actionInProgress">Creating user...</span>
</button>
<span class="text-danger" ng-if="state.userCreationError" style="margin: 5px;">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i> {{ state.userCreationError }}

View file

@ -6,7 +6,7 @@ function ($q, $scope, $state, $sanitize, UserService, TeamService, TeamMembershi
selectedItemCount: 0,
validUsername: false,
pagination_count: Pagination.getPaginationCount('users'),
deploymentInProgress: false
actionInProgress: false
};
$scope.sortType = 'RoleName';
$scope.sortReverse = false;
@ -58,7 +58,7 @@ function ($q, $scope, $state, $sanitize, UserService, TeamService, TeamMembershi
};
$scope.addUser = function() {
$scope.state.deploymentInProgress = true;
$scope.state.actionInProgress = true;
$scope.state.userCreationError = '';
var username = $sanitize($scope.formValues.Username);
var password = $sanitize($scope.formValues.Password);
@ -76,7 +76,7 @@ function ($q, $scope, $state, $sanitize, UserService, TeamService, TeamMembershi
Notifications.error('Failure', err, 'Unable to create user');
})
.finally(function final() {
$scope.state.deploymentInProgress = false;
$scope.state.actionInProgress = false;
});
};