mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
webgui: Added ability to set warning percentage for CPU, mempools from device edit page (#5895)
This commit is contained in:
committed by
Neil Lathwood
parent
354bd2144d
commit
afb838bc10
@@ -196,10 +196,16 @@ function generate_overlib_content($graph_array, $text)
|
||||
}//end generate_overlib_content()
|
||||
|
||||
|
||||
function get_percentage_colours($percentage)
|
||||
function get_percentage_colours($percentage, $component_perc_warn = null)
|
||||
{
|
||||
$perc_warn = '75';
|
||||
|
||||
if (isset($component_perc_warn)) {
|
||||
$perc_warn = round($component_perc_warn, 0);
|
||||
}
|
||||
|
||||
$background = array();
|
||||
if ($percentage > '90') {
|
||||
if ($percentage > $perc_warn) {
|
||||
$background['left'] = 'c4323f';
|
||||
$background['right'] = 'C96A73';
|
||||
} elseif ($percentage > '75') {
|
||||
|
||||
Reference in New Issue
Block a user