Add app stop modal

This commit is contained in:
Johannes Zellner
2021-04-13 13:22:49 +02:00
parent 4e2a5e6f15
commit ba7ef8e7f0
3 changed files with 27 additions and 2 deletions

View File

@@ -1143,7 +1143,14 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
busyRunState: false,
startButton: false,
toggleRunState: function () {
toggleRunState: function (confirmStop) {
if (confirmStop && $scope.app.runState !== RSTATES.STOPPED) {
$('#stopModal').modal('show');
return;
}
$('#stopModal').modal('hide');
var func = $scope.app.runState === RSTATES.STOPPED ? Client.startApp : Client.stopApp;
$scope.uninstall.busyRunState = true;