Only show cpuUsage if we have an Id
parent
ebad97038e
commit
f9a1b6b4f4
|
@ -390,7 +390,7 @@ function getCpuUsageHTML() {
|
|||
$result = '';
|
||||
if ( !canView('System') ) return $result;
|
||||
global $thisServer;
|
||||
if ($thisServer) {
|
||||
if ($thisServer and $thisServer->Id()) {
|
||||
$result .= '<li id="getCpuUsagesHTML" class="CpuUsage nav-item mx-2">'.PHP_EOL;
|
||||
$result .= ' '.translate('Cpu').': '.number_format($thisServer->CpuUsagePercent(), 1, '.', '').'%'.PHP_EOL;
|
||||
$result .= '</li>'.PHP_EOL;
|
||||
|
|
Loading…
Reference in New Issue