Only show cpuUsage if we have an Id

pull/3841/head
Isaac Connor 2024-02-22 12:55:35 -05:00
parent ebad97038e
commit f9a1b6b4f4
1 changed files with 1 additions and 1 deletions

View File

@ -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 .= '&nbsp;'.translate('Cpu').': '.number_format($thisServer->CpuUsagePercent(), 1, '.', '').'%'.PHP_EOL;
$result .= '</li>'.PHP_EOL;