Handle div by zero when TotalMem is not known for Server
This commit is contained in:
parent
8d07a4a08f
commit
7e62ccca3c
|
@ -247,7 +247,7 @@ foreach ( array_map('basename', glob('skins/'.$current_skin.'/css/*',GLOB_ONLYDI
|
|||
<td class="colCpuLoad <?php if ( $Server->CpuLoad() > 5 ) { echo 'danger'; } ?>">
|
||||
<?php echo makePopupLink('?view=server&id='.$Server->Id(), 'zmServer', 'server',$Server->CpuLoad(), $canEdit) ?>
|
||||
</td>
|
||||
<td class="colMemory <?php if ( $Server->FreeMem()/$Server->TotalMem() < .1 ) { echo 'danger'; } ?>">
|
||||
<td class="colMemory <?php if ( (!$Server->TotalMem()) or ($Server->FreeMem()/$Server->TotalMem() < .1) ) { echo 'danger'; } ?>">
|
||||
<?php echo makePopupLink('?view=server&id='.$Server->Id(), 'zmServer', 'server', human_filesize($Server->FreeMem()) . ' / ' . human_filesize($Server->TotalMem()), $canEdit) ?>
|
||||
</td>
|
||||
<td class="colSwap <?php if ( (!$Server->TotalSwap()) or ($Server->FreeSwap()/$Server->TotalSwap() < .1) ) { echo 'danger'; } ?>">
|
||||
|
|
Loading…
Reference in New Issue