diff --git a/src/js/terminal.js b/src/js/terminal.js index 3b722d233..a4e6e4f47 100644 --- a/src/js/terminal.js +++ b/src/js/terminal.js @@ -152,50 +152,6 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client }); }; - $scope.pauseApp = function () { - $('#pauseAppModal').modal('show'); - }; - - $scope.pauseAppBegin = function () { - $scope.appBusy = true; - - 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(waitUntilInPauseState, 2000); - }); - } - - Client.debugApp($scope.selected.value, true, function (error) { - if (error) return console.error(error); - - $('#pauseAppModal').modal('hide'); - - waitUntilInPauseState(); - }); - }; - - $scope.pauseAppDone = function () { - $scope.appBusy = true; - - function waitUntilInNormalState() { - 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(waitUntilInNormalState, 2000); - }); - } - - Client.debugApp($scope.selected.value, false, function (error) { - if (error) return console.error(error); - - waitUntilInNormalState(); - }); - }; - function createTerminalSocket() { try { // websocket cannot use relative urls diff --git a/src/terminal.html b/src/terminal.html index 6728d5a0c..0dc3fc56c 100644 --- a/src/terminal.html +++ b/src/terminal.html @@ -101,25 +101,6 @@ - - -
@@ -148,8 +129,6 @@ - -
diff --git a/src/views/app.html b/src/views/app.html index 57957b549..96571cfc0 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -757,15 +757,22 @@
- -

Use the repair button to retry failed operations or if the app is down.

- -

If the app is not starting up because of a broken plugin or misconfiguration, use the Terminal - and click 'Pause' to edit the app's filesystem.

- + +

If the app is constantly restarting because of a broken plugin or misconfiguration, place the app in recovery mode. + Use the following instructions + to get the app running again. +

+ + +
+
+
+
+
+ +

If a task (configuration, update, restore, backup) resulted in the app ending up in an error state, you can retry the operation.

An error occurred during the {{ app.error.installationState | taskName }} operation: {{ app.error.reason + ': ' + app.error.message }}

- - +
diff --git a/src/views/app.js b/src/views/app.js index 33aadd9ae..e8cf0c690 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -917,6 +917,41 @@ angular.module('Application').controller('AppController', ['$scope', '$location' if (error && error.statusCode !== 409) Client.error(error); }); }, + + pauseBusy: false, + + pauseAppBegin: function () { + $scope.repair.pauseBusy = true; + + Client.debugApp($scope.app.id, true, function (error) { + if (error) return console.error(error); + + refreshApp($scope.app.id, function () { + waitForAppTask(function (error) { + if (error) return Client.error(error); + + $scope.repair.pauseBusy = false; + }); + }); + }); + }, + + pauseAppDone: function () { + $scope.repair.pauseBusy = true; + + Client.debugApp($scope.app.id, false, function (error) { + if (error) return console.error(error); + + refreshApp($scope.app.id, function () { + waitForAppTask(function (error) { + if (error) return Client.error(error); + + $scope.repair.pauseBusy = false; + }); + }); + }); + } + }; $scope.postInstallConfirm = {