From 137bdb1f241bc33414bbdc145dfce5f06b22bd25 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 10 Feb 2020 14:20:46 -0500 Subject: [PATCH] Make shm have error or warning class if full --- web/skins/classic/includes/functions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 9f14d93d0..ceaee50d5 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -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 ' '.ZM_PATH_MAP.': '.$shm_percent.'%'; ?>