Make shm have error or warning class if full

This commit is contained in:
Isaac Connor 2020-02-10 14:20:46 -05:00
parent 389a6b3ec8
commit 137bdb1f24
1 changed files with 8 additions and 1 deletions

View File

@ -423,7 +423,14 @@ if ( (!ZM_OPT_USE_AUTH) or $user ) {
$storage_areas = $storage_areas_with_no_server_id;
if ( count($storage_areas) <= 4 )
echo implode(', ', array_map($func, $storage_areas));
echo ' ' . ZM_PATH_MAP .': '. getDiskPercent(ZM_PATH_MAP).'%';
$shm_percent = getDiskPercent(ZM_PATH_MAP);
$class = '';
if ( $shm_percent > 98 ) {
$class = 'error';
} else if ( $shm_percent > 90 ) {
$class = 'warning';
}
echo ' <span class="'.$class.'">'.ZM_PATH_MAP.': '.$shm_percent.'%</span>';
?></li>
</ul>
<?php if ( defined('ZM_WEB_CONSOLE_BANNER') and ZM_WEB_CONSOLE_BANNER != '' ) { ?>