@@ -70,6 +76,14 @@ function show_system_status() {
...
@@ -70,6 +76,14 @@ function show_system_status() {
$('#system-privacy-setting p').toggle(r);
$('#system-privacy-setting p').toggle(r);
});
});
api(
"/system/reboot",
"GET",
{},
function(r){
$('#system-reboot-required').toggle(r);
});
api(
api(
"/system/status",
"/system/status",
"POST",
"POST",
...
@@ -122,4 +136,20 @@ function enable_privacy(status) {
...
@@ -122,4 +136,20 @@ function enable_privacy(status) {
});
});
returnfalse;// disable link
returnfalse;// disable link
}
}
functionconfirm_reboot(){
show_modal_confirm(
"Reboot server",
$("<p>This will reboot your server, until the server is fully restarted your users will not be able to send and receive email. The reboot can't be cancelled</p>"),
"Reboot now",
function(){
api(
"/system/reboot",
"POST",
{},
function(r){
show_modal_error("Reboot","Please refresh the page after a minute or so."+r);