summaryrefslogtreecommitdiffstats
path: root/modules-available/systemstatus/page.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/systemstatus/page.inc.php')
-rw-r--r--modules-available/systemstatus/page.inc.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/modules-available/systemstatus/page.inc.php b/modules-available/systemstatus/page.inc.php
index a8deeecb..f7ec7022 100644
--- a/modules-available/systemstatus/page.inc.php
+++ b/modules-available/systemstatus/page.inc.php
@@ -59,17 +59,22 @@ class Page_SystemStatus extends Page
protected function ajaxDmsdUsers()
{
$ret = Download::asStringPost('http://127.0.0.1:9080/status/fileserver', false, 2, $code);
+ $args = array();
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'];
+ $args['dmsd_error'] = true;
} else {
- $ret = '???';
+ $data = @json_decode($ret, true);
+ if (is_array($data)) {
+ $args['uploads'] = $data['activeUploads'];
+ $args['downloads'] = $data['activeDownloads'];
+ }
+ }
+ if (file_exists('/run/reboot-required.pkgs')) {
+ $lines = file('/run/reboot-required.pkgs', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
+ $lines = array_unique($lines);
+ $args['packages'] = implode(', ', $lines);
}
- die($ret);
+ echo Render::parse('ajax-reboot', $args);
}
protected function ajaxDiskStat()