bring back reboot button
This commit is contained in:
@@ -126,6 +126,25 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
}
|
||||
};
|
||||
|
||||
$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);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function updateDiskGraphs() {
|
||||
// https://graphite.readthedocs.io/en/latest/render_api.html#paths-and-wildcards
|
||||
@@ -232,4 +251,9 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Client.onReconnect(function () {
|
||||
$scope.reboot.busy = false;
|
||||
});
|
||||
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user