Move reboot server dialog and logic to main view

This commit is contained in:
Johannes Zellner
2020-11-05 16:45:45 +01:00
parent 61c1622cbf
commit 93a7137d10
6 changed files with 43 additions and 83 deletions

View File

@@ -29,26 +29,6 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
return getRandomColor();
}
$scope.reboot = {
busy: false,
show: function () {
$scope.reboot.busy = false;
$('#rebootModal').modal('show');
},
submit: function () {
$scope.reboot.busy = true;
Client.reboot(function (error) {
if (error) return Client.error(error);
$('#rebootModal').modal('hide');
// trigger refetch to show offline banner
$timeout(function () { Client.getStatus(function () {}); }, 8000);
});
}
};
$scope.disks = {
busy: true,
errorMessage: '',