mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-09-11 00:09:00 +02:00
Show uptime in system status page
This commit is contained in:
@@ -39,6 +39,9 @@
|
||||
<div class="row">
|
||||
<div class="col-md-push-9 col-md-3">
|
||||
|
||||
<div id="system-uptime" style="display: none; margin-bottom: 1em;">
|
||||
</div>
|
||||
|
||||
<div id="system-reboot-required" style="display: none; margin-bottom: 1em;">
|
||||
<button type="button" class="btn btn-danger" onclick="confirm_reboot(); return false;">Reboot Box</button>
|
||||
<div>No reboot is necessary.</div>
|
||||
@@ -77,6 +80,15 @@ function show_system_status() {
|
||||
$('#system-privacy-setting p').toggle(r);
|
||||
});
|
||||
|
||||
api(
|
||||
"/system/uptime",
|
||||
"GET",
|
||||
{ },
|
||||
function(r) {
|
||||
$('#system-uptime').text(r);
|
||||
$('#system-uptime').show();
|
||||
});
|
||||
|
||||
api(
|
||||
"/system/reboot",
|
||||
"GET",
|
||||
|
||||
Reference in New Issue
Block a user