summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/systemstatus.inc.php16
-rw-r--r--templates/systemstatus/_page.html2
2 files changed, 18 insertions, 0 deletions
diff --git a/modules/systemstatus.inc.php b/modules/systemstatus.inc.php
index 46bab5b6..0106ab9d 100644
--- a/modules/systemstatus.inc.php
+++ b/modules/systemstatus.inc.php
@@ -49,6 +49,22 @@ class Page_SystemStatus extends Page
echo "Action $action not known in " . get_class();
}
}
+
+ protected function ajaxDmsdUsers()
+ {
+ $ret = Download::asStringPost('http://127.0.0.1:9080/status/fileserver', false, 2, $code);
+ if ($code != 200) {
+ Header('HTTP/1.1 502 Internal Server Error');
+ die('Internal Server Wurst');
+ }
+ $data = @json_decode($ret, true);
+ if (is_array($data)) {
+ $ret = 'Uploads: ' . $data['activeUploads'] . ', Downloads: ' . $data['activeDownloads'];
+ } else {
+ $ret = '???';
+ }
+ die($ret);
+ }
protected function ajaxDiskStat()
{
diff --git a/templates/systemstatus/_page.html b/templates/systemstatus/_page.html
index 79024ad6..546a827b 100644
--- a/templates/systemstatus/_page.html
+++ b/templates/systemstatus/_page.html
@@ -70,6 +70,7 @@
<label><input type="checkbox" name="confirm" value="yep"> {{lang_iAmSure}}</label>
<button class="btn btn-warning btn-xs" type="submit">Reboot</button>
</form>
+ <div id="dmsd-users"></div>
</div>
</div>
</div>
@@ -112,5 +113,6 @@
loadContent('#dmsd-log', '?do=SystemStatus&action=DmsdLog');
loadContent('#netstat', '?do=SystemStatus&action=Netstat');
loadContent('#pslist', '?do=SystemStatus&action=PsList');
+ loadContent('#dmsd-users', '?do=SystemStatus&action=DmsdUsers');
}, 500);
</script>