Skip to content

Commit

Permalink
Set ping_perf scale_min to 0 (librenms#14989)
Browse files Browse the repository at this point in the history
And allow scale_min, scale_max, and scale_rigid to be set via url parameter
  • Loading branch information
murrant authored and ajsiersema committed Apr 24, 2023
1 parent 3f68875 commit f4cb91e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LibreNMS/Data/Graphing/GraphParameters.php
Expand Up @@ -104,6 +104,9 @@ public function __construct(array $vars)
$this->to = empty($vars['to']) ? time() : Time::parseAt($vars['to']);
$this->period = $this->to - $this->from;
$this->prev_from = $this->from - $this->period;
$this->scale_min = $vars['scale_min'] ?? null;
$this->scale_max = $vars['scale_max'] ?? null;
$this->scale_rigid = isset($vars['scale_rigid']) && $vars['scale_rigid'] && $vars['scale_rigid'] !== 'no';

$this->inverse = ! empty($vars['inverse']);
$this->in = $this->inverse ? 'out' : 'in';
Expand Down
1 change: 1 addition & 0 deletions includes/html/graphs/device/ping_perf.inc.php
Expand Up @@ -16,5 +16,6 @@

$descr = 'Milliseconds';
$ds = 'ping';
$scale_min = 0;

require 'includes/html/graphs/generic_stats.inc.php';

0 comments on commit f4cb91e

Please sign in to comment.