mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add graph_stat_percentile_disable config item to disable percentile lines/value printing (#14887)
* add the initial config items for graph_stat_percentile_disable * update generic stats to use graph_stat_percentile_disable * style fix
This commit is contained in:
committed by
GitHub
parent
b2574196ef
commit
cd82c72190
@@ -98,6 +98,8 @@ if (! isset($colour1w)) {
|
||||
$iter++;
|
||||
}
|
||||
|
||||
$graph_stat_percentile_disable = \LibreNMS\Config::get('graph_stat_percentile_disable');
|
||||
|
||||
$descr = \LibreNMS\Data\Store\Rrd::fixedSafeDescr($descr, $descr_len);
|
||||
|
||||
if ($height > 25) {
|
||||
@@ -155,14 +157,16 @@ if ($height > 25) {
|
||||
$rrd_optionsb .= ' GPRINT:' . $id . '1w:MAX:%5.' . $float_precision . 'lf%s' . $units . ' GPRINT:' . $id . "1w:AVERAGE:'%5." . $float_precision . "lf%s$units\\n'";
|
||||
}
|
||||
|
||||
$rrd_optionsb .= ' HRULE:' . $id . '25th#' . $colour25th . ':25th_Percentile';
|
||||
$rrd_optionsb .= ' GPRINT:' . $id . '25th:%' . $float_precision . 'lf%s\n';
|
||||
if (! $graph_stat_percentile_disable) {
|
||||
$rrd_optionsb .= ' HRULE:' . $id . '25th#' . $colour25th . ':25th_Percentile';
|
||||
$rrd_optionsb .= ' GPRINT:' . $id . '25th:%' . $float_precision . 'lf%s\n';
|
||||
|
||||
$rrd_optionsb .= ' HRULE:' . $id . '50th#' . $colour50th . ':50th_Percentile';
|
||||
$rrd_optionsb .= ' GPRINT:' . $id . '50th:%' . $float_precision . 'lf%s\n';
|
||||
$rrd_optionsb .= ' HRULE:' . $id . '50th#' . $colour50th . ':50th_Percentile';
|
||||
$rrd_optionsb .= ' GPRINT:' . $id . '50th:%' . $float_precision . 'lf%s\n';
|
||||
|
||||
$rrd_optionsb .= ' HRULE:' . $id . '75th#' . $colour75th . ':75th_Percentile';
|
||||
$rrd_optionsb .= ' GPRINT:' . $id . '75th:%' . $float_precision . 'lf%s\n';
|
||||
$rrd_optionsb .= ' HRULE:' . $id . '75th#' . $colour75th . ':75th_Percentile';
|
||||
$rrd_optionsb .= ' GPRINT:' . $id . '75th:%' . $float_precision . 'lf%s\n';
|
||||
}
|
||||
}
|
||||
$rrd_options .= $rrd_optionsb;
|
||||
$rrd_options .= ' HRULE:0#555555';
|
||||
|
||||
@@ -1776,6 +1776,13 @@
|
||||
"default": null,
|
||||
"type": "array"
|
||||
},
|
||||
"graph_stat_percentile_disable": {
|
||||
"default": false,
|
||||
"group": "webui",
|
||||
"section": "graph",
|
||||
"order": 7,
|
||||
"type": "boolean"
|
||||
},
|
||||
"graph_colours.blues": {
|
||||
"default": [
|
||||
"A9A9F2",
|
||||
|
||||
@@ -1580,6 +1580,10 @@ return [
|
||||
'description' => 'Set the minimum graph height',
|
||||
'help' => 'Minimum Graph Height (default: 300)',
|
||||
],
|
||||
'graph_stat_percentile_disable' => [
|
||||
'description' => 'Disable Percentile for stats graphs globally',
|
||||
'help' => 'Disables display of the percentile values and lines for graphs that display those',
|
||||
],
|
||||
],
|
||||
'device_display_default' => [
|
||||
'description' => 'Default device display name template',
|
||||
|
||||
@@ -1547,6 +1547,10 @@ return [
|
||||
'description' => 'Set the minimum graph height',
|
||||
'help' => 'Minimum Graph Height (default: 300)',
|
||||
],
|
||||
'graph_stat_percentile_disable' => [
|
||||
'description' => 'Disable Percentile for stats graphs globally',
|
||||
'help' => 'Disables display of the percentile values and lines for graphs that display those',
|
||||
],
|
||||
],
|
||||
'device_display_default' => [
|
||||
'description' => 'Default device display name template',
|
||||
|
||||
Reference in New Issue
Block a user