Skip to content

Commit a19e7f1

Browse files
authored
Fix typo (librenms#17105)
1 parent 9c3e5a7 commit a19e7f1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/Models/Sensor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,17 @@ public function currentStatus(): Severity
171171
return Severity::Ok;
172172
}
173173

174-
public function hasTresholds(): bool
174+
public function hasThresholds(): bool
175175
{
176176
return $this->sensor_limit_low !== null
177177
|| $this->sensor_limit_low_warn !== null
178178
|| $this->sensor_limit_warn !== null
179179
|| $this->sensor_limit !== null;
180180
}
181181

182-
public function doesntHaveTresholds(): bool
182+
public function doesntHaveThresholds(): bool
183183
{
184-
return ! $this->hasTresholds();
184+
return ! $this->hasThresholds();
185185
}
186186
// ---- Define Relationships ----
187187

includes/html/graphs/sensor/generic.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
$rrd_options .= ' AREA:sensor_max' . $variance_color;
2121
$rrd_options .= ' AREA:sensor_min' . $background_color;
2222

23-
if ($sensor->hasTresholds()) {
23+
if ($sensor->hasThresholds()) {
2424
$rrd_options .= ' COMMENT:"Alert thresholds\:"';
2525
$rrd_options .= ($sensor->sensor_limit_low) ? ' LINE1.5:' . $sensor->sensor_limit_low . '#00008b:"low = ' . Number::formatSi($sensor->sensor_limit_low, 2, 3, $sensor->unit()) . '":dashes' : '';
2626
$rrd_options .= ($sensor->sensor_limit_low_warn) ? ' LINE1.5:' . $sensor->sensor_limit_low_warn . '#005bdf:"low_warn = ' . Number::formatSi($sensor->sensor_limit_low_warn, 2, 3, $sensor->unit()) . '":dashes' : '';
@@ -31,7 +31,7 @@
3131
// Workaround because rrdtool has trouble detecting the
3232
// range if the sensor is constant and no thresholds are
3333
// defined, so it's forced to +-1% of the min/max.
34-
if ($sensor->doesntHaveTresholds()) {
34+
if ($sensor->doesntHaveThresholds()) {
3535
$rrd_options .= ' CDEF:canvas_max=sensor_max,1.01,*';
3636
$rrd_options .= ' LINE0:canvas_max#000000ff::dashes'; // Hidden for scale only
3737
$rrd_options .= ' CDEF:canvas_min=sensor_min,0.99,*';

0 commit comments

Comments
 (0)