Improve app overview and add restart action
This commit is contained in:
+12
-1
@@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user