From 2796ad12fea948bee89ccf297bccba87332f74d3 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 29 Aug 2019 14:51:21 -0700 Subject: [PATCH] Show app cancel busy indicator --- src/views/apps.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/views/apps.js b/src/views/apps.js index 3633f5059..6181b996d 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -468,13 +468,18 @@ angular.module('Application').controller('AppsController', ['$scope', '$location }, submit: function () { + $scope.appCancel.busy = true; + Client.stopTask($scope.appCancel.app.taskId, function (error) { if (error) Client.error(error); - $scope.appCancel.busy = false; - Client.refreshAppCache($scope.appCancel.app.id); // reflect the new app state immediately + setTimeout(function () { // small delay for UI + $scope.appCancel.busy = false; - $('#appCancelModal').modal('hide'); + Client.refreshAppCache($scope.appCancel.app.id); // reflect the new app state immediately + + $('#appCancelModal').modal('hide'); + }, 1000); }); return false; // prevent propagation and default