1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-06 06:15:22 +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

@ -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;
});
};