terminal: repair -> pause
This commit is contained in:
@@ -146,32 +146,32 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
|
||||
});
|
||||
};
|
||||
|
||||
$scope.repairApp = function () {
|
||||
$('#repairAppModal').modal('show');
|
||||
$scope.pauseApp = function () {
|
||||
$('#pauseAppModal').modal('show');
|
||||
};
|
||||
|
||||
$scope.repairAppBegin = function () {
|
||||
$scope.pauseAppBegin = function () {
|
||||
$scope.appBusy = true;
|
||||
|
||||
function waitUntilInRepairState() {
|
||||
function waitUntilInPauseState() {
|
||||
refreshApp($scope.selected.value, function (error, result) {
|
||||
if (error) return console.error('Failed to get app status.', error);
|
||||
|
||||
if (result.installationState === 'installed') $scope.appBusy = false;
|
||||
else setTimeout(waitUntilInRepairState, 2000);
|
||||
else setTimeout(waitUntilInPauseState, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
Client.debugApp($scope.selected.value, true, function (error) {
|
||||
if (error) return console.error(error);
|
||||
|
||||
$('#repairAppModal').modal('hide');
|
||||
$('#pauseAppModal').modal('hide');
|
||||
|
||||
waitUntilInRepairState();
|
||||
waitUntilInPauseState();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.repairAppDone = function () {
|
||||
$scope.pauseAppDone = function () {
|
||||
$scope.appBusy = true;
|
||||
|
||||
function waitUntilInNormalState() {
|
||||
|
||||
Reference in New Issue
Block a user