Improve app overview and add restart action

This commit is contained in:
Johannes Zellner
2019-09-12 17:42:33 +02:00
parent 96bb293c1f
commit 2027f8052b
4 changed files with 75 additions and 31 deletions
+12 -1
View File
@@ -11,6 +11,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.app = null;
$scope.activeTask = null;
$scope.appIsRestarting = false;
$scope.ready = false;
$scope.HOST_PORT_MIN = 1024;
$scope.HOST_PORT_MAX = 65535;
@@ -24,7 +25,17 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.stopAppTask = function (taskId) {
Client.stopTask(taskId, function (error) {
if (error) return Client.error(error);
if (error) Client.error(error);
});
};
$scope.restartApp = function () {
$scope.appIsRestarting = true;
Client.restartApp($scope.app.id, function (error) {
if (error) Client.error(error);
$scope.appIsRestarting = false;
});
};