Fix device poller modules graph (#14640)

This commit is contained in:
Tony Murray 2022-11-16 13:48:30 -06:00 committed by GitHub
parent c9d617823d
commit cb9e01a030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 9 deletions

View File

@ -19,7 +19,6 @@ ksort($modules);
require 'includes/html/graphs/common.inc.php';
$count = 0;
foreach ($modules as $module => $module_status) {
$rrd_filename = Rrd::name($device['hostname'], ['poller-perf', $module]);
if ($attribs['poll_' . $module] || ($module_status && ! isset($attribs['poll_' . $module])) ||
@ -29,14 +28,13 @@ foreach ($modules as $module => $module_status) {
$ds['descr'] = $module;
$ds['filename'] = $rrd_filename;
$rrd_list[] = $ds;
$count++;
}
}
}
$unit_text = 'Seconds';
$simple_rrd = false;
$nototal = false;
$nototal = true;
$text_orig = true;
$colours = 'manycolours';
require 'includes/html/graphs/generic_multi_simplex_seperated.inc.php';

View File

@ -3,7 +3,7 @@
require 'includes/html/graphs/common.inc.php';
$unitlen = $unitlen ?? 0;
$descr_len = $descr_len ?? 0;
$descr_len = $descr_len ?? 12;
$multiplier = $multiplier ?? false;
$previous = $graph_params->visible('previous');
$stack = $stack ?? '';
@ -13,10 +13,6 @@ $thingX = '';
$plusX = '';
$plusesX = '';
if (! isset($descr_len)) {
$descr_len = 12;
}
if ($nototal) {
$descr_len += 2;
$unitlen += 2;
@ -24,7 +20,7 @@ if ($nototal) {
$rrd_options .= " COMMENT:'" . \LibreNMS\Data\Store\Rrd::fixedSafeDescr($unit_text, $descr_len) . " Now Min Max Avg\l'";
$unitlen = '10';
$unitlen = 10;
if ($nototal) {
$descr_len += 2;
$unitlen += 2;