mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
refactor(ux): rename deploymentInProgress variable (#1385)
This commit is contained in:
parent
d68708add7
commit
efc3154617
40 changed files with 130 additions and 130 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue