app: add console section
This commit is contained in:
+14
-12
@@ -661,23 +661,16 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
}
|
||||
};
|
||||
|
||||
$scope.debug = {
|
||||
$scope.console = {
|
||||
show: function () {},
|
||||
busyRunState: false,
|
||||
|
||||
stopAppTask: function (taskId) {
|
||||
Client.stopTask(taskId, function (error) {
|
||||
// we can ignore a call trying to cancel an already done task
|
||||
if (error && error.statusCode !== 409) Client.error(error);
|
||||
});
|
||||
},
|
||||
|
||||
toggleRunState: function () {
|
||||
var func = $scope.app.runState === RSTATES.STOPPED ? Client.startApp : Client.stopApp;
|
||||
$scope.debug.busyRunState = true;
|
||||
$scope.console.busyRunState = true;
|
||||
|
||||
func($scope.app.id, function (error) {
|
||||
$scope.debug.busyRunState = false;
|
||||
$scope.console.busyRunState = false;
|
||||
if (error) return Client.error(error);
|
||||
|
||||
refreshApp();
|
||||
@@ -821,8 +814,10 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
|
||||
backupId: '',
|
||||
|
||||
show: function () {},
|
||||
|
||||
// this prepares the repair dialog with whatever is required for repair action
|
||||
show: function () {
|
||||
confirm: function () {
|
||||
$scope.repair.error = {};
|
||||
$scope.repair.busy = false;
|
||||
$scope.repair.location = null;
|
||||
@@ -917,7 +912,14 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
$scope.repair.busy = false;
|
||||
$('#repairModal').modal('hide');
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
stopAppTask: function (taskId) {
|
||||
Client.stopTask(taskId, function (error) {
|
||||
// we can ignore a call trying to cancel an already done task
|
||||
if (error && error.statusCode !== 409) Client.error(error);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
$scope.postInstallConfirm = {
|
||||
|
||||
Reference in New Issue
Block a user