From aa4734d5a3a428d8797aabf41ae88de348204afb Mon Sep 17 00:00:00 2001 From: Gunnar Mills Date: Fri, 17 May 2019 15:56:18 -0500 Subject: Added comments to help clarify "confirm" For the next person digging in this code. :) Change-Id: Ib6c21da3fb53a4277a90bf2e5cab90ed29496724 Signed-off-by: Gunnar Mills --- app/server-control/controllers/power-operations-controller.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/server-control') diff --git a/app/server-control/controllers/power-operations-controller.js b/app/server-control/controllers/power-operations-controller.js index c82d36f..0993d72 100644 --- a/app/server-control/controllers/power-operations-controller.js +++ b/app/server-control/controllers/power-operations-controller.js @@ -16,6 +16,8 @@ window.angular && (function(angular) { $scope, APIUtils, dataService, Constants, $timeout, $interval, $interpolate, $q, toastService) { $scope.dataService = dataService; + // Is a || of the other 4 "confirm" variables to ensure only + // one confirm is shown at a time. $scope.confirm = false; $scope.confirmWarmReboot = false; $scope.confirmColdReboot = false; @@ -116,6 +118,7 @@ window.angular && (function(angular) { $scope.warmRebootConfirm = function() { if ($scope.confirm) { + // If another "confirm" is already shown return return; } $scope.confirm = true; -- cgit v1.2.1