From c4389a9ab63e9c9641da6a8dd3ec4f8c61a92b98 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 16 Sep 2015 10:38:35 +0200 Subject: [systemstatus] Show active uploads/downloads --- modules/systemstatus.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'modules/systemstatus.inc.php') 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() { -- cgit v1.2.3-55-g7522