Reset views on change

This commit is contained in:
Johannes Zellner
2019-09-17 14:52:22 +02:00
parent 9d61270937
commit 8810439ffc
2 changed files with 22 additions and 9 deletions
+13
View File
@@ -54,6 +54,17 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.backupsEnabled = true;
$scope.disableIndexingTemplate = '# Disable search engine indexing\n\nUser-agent: *\nDisallow: /';
$scope.setView = function (view) {
if ($scope.view === view) return;
$scope[view].show();
$scope.view = view;
};
$scope.overview = {
show: function () {}
};
$scope.display = {
busy: false,
error: {},
@@ -512,6 +523,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
};
$scope.debug = {
show: function () {},
stopAppTask: function (taskId) {
Client.stopTask(taskId, function (error) {
// we can ignore a call trying to cancel an already done task