diff options
author | Simon Rettberg | 2014-06-11 14:31:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-06-11 14:31:09 +0200 |
commit | 62d6349c790076ec26edd6e10d617b2f4c385e8b (patch) | |
tree | b2884200b75b34994ddfcfef06bff3d127427e73 /modules | |
parent | Reboot functionality on system status page (diff) | |
download | slx-admin-62d6349c790076ec26edd6e10d617b2f4c385e8b.tar.gz slx-admin-62d6349c790076ec26edd6e10d617b2f4c385e8b.tar.xz slx-admin-62d6349c790076ec26edd6e10d617b2f4c385e8b.zip |
Minor bug fixes and removal of dead code
Diffstat (limited to 'modules')
-rw-r--r-- | modules/systemstatus.inc.php | 2 | ||||
-rw-r--r-- | modules/vmstore.inc.php | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/modules/systemstatus.inc.php b/modules/systemstatus.inc.php index bfef54ef..a83a8919 100644 --- a/modules/systemstatus.inc.php +++ b/modules/systemstatus.inc.php @@ -9,6 +9,7 @@ class Page_SystemStatus extends Page User::load(); if (!User::isLoggedIn()) { + Message::addError('no-permission'); Util::redirect('?do=Main'); } @@ -153,6 +154,7 @@ class Page_SystemStatus extends Page $total = $out['user'] + $out['nice'] + $out['system'] + $out['idle'] + $out['iowait'] + $out['irq'] + $out['softirq']; $data['cpuLoad'] = 100 - round(($out['idle'] / $total) * 100); $data['cpuSystem'] = round((($out['iowait'] + $out['irq'] + $out['softirq']) / $total) * 100); + $data['cpuLoadOk'] = true; } echo Render::parse('systemstatus/systeminfo', $data); } diff --git a/modules/vmstore.inc.php b/modules/vmstore.inc.php index 9c8e5f42..8037d038 100644 --- a/modules/vmstore.inc.php +++ b/modules/vmstore.inc.php @@ -56,9 +56,6 @@ class Page_VmStore extends Page Message::addError('value-invalid', 'nfsaddr', $vmstore['nfsaddr']); Util::redirect('?do=VmStore'); } - if ($storetype === 'nfs') $addr = $vmstore['nfsaddr']; - if ($storetype === 'cifs') $addr = $vmstore['nfsaddr']; - if ($storetype === 'internal') $addr = 'none'; Property::setVmStoreConfig($vmstore); $this->mountTask = Trigger::mount(); } |