Skip to content

Commit e47712c

Browse files
authored
Remove incorrect dirFromHost usage (librenms#17467)
Also found a bad unused graph file
1 parent 0391c21 commit e47712c

10 files changed

+8
-51
lines changed

includes/html/graphs/application/nfs-stats.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$smalldescrlen = 15;
1010
$dostack = 0;
1111
$printtotal = 0;
12-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfsstats-' . $app->app_id . '.rrd';
12+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfsstats', $app->app_id]);
1313
$array = [
1414
'total' => [
1515
'descr' => 'Total',

includes/html/graphs/application/nfs-v3-stats_fh.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$printtotal = 0;
1212
$addarea = 1;
1313
$transparency = 33;
14-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfs-stats-' . $app->app_id . '.rrd';
14+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfs-stats', $app->app_id]);
1515
$array = [
1616
'fh_lookup' => ['descr' => 'lookup', 'colour' => '136421'],
1717
'fh_anon' => ['descr' => 'anon', 'colour' => 'B2C945'],

includes/html/graphs/application/nfs-v3-stats_io.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$printtotal = 0;
1212
$addarea = 1;
1313
$transparency = 33;
14-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfs-stats-' . $app->app_id . '.rrd';
14+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfs-stats', $app->app_id]);
1515
$array = [
1616
'io_read' => ['descr' => 'read', 'colour' => '2B9220'],
1717
'io_write' => ['descr' => 'write', 'colour' => 'B0262D'],

includes/html/graphs/application/nfs-v3-stats_net.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$printtotal = 0;
1212
$addarea = 1;
1313
$transparency = 33;
14-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfs-stats-' . $app->app_id . '.rrd';
14+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfs-stats', $app->app_id]);
1515
$array = [
1616
'net_all' => ['descr' => 'total', 'colour' => '000000'],
1717
'net_udp' => ['descr' => 'udp', 'colour' => 'AA3F39'],

includes/html/graphs/application/nfs-v3-stats_ra.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$printtotal = 0;
1212
$addarea = 1;
1313
$transparency = 33;
14-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfs-stats-' . $app->app_id . '.rrd';
14+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfs-stats', $app->app_id]);
1515
$array = [
1616
'ra_size' => ['descr' => 'size', 'colour' => '091B40'],
1717
'ra_range01' => ['descr' => '0-10', 'colour' => '8293B3'],

includes/html/graphs/application/nfs-v3-stats_rc.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$printtotal = 0;
1212
$addarea = 1;
1313
$transparency = 33;
14-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfs-stats-' . $app->app_id . '.rrd';
14+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfs-stats', $app->app_id]);
1515
$array = [
1616
'rc_hits' => ['descr' => 'hits', 'colour' => '2B9220'],
1717
'rc_misses' => ['descr' => 'misses', 'colour' => 'B36326'],

includes/html/graphs/application/nfs-v3-stats_rpc.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$printtotal = 0;
1212
$addarea = 1;
1313
$transparency = 33;
14-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfs-stats-' . $app->app_id . '.rrd';
14+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfs-stats', $app->app_id]);
1515
$array = [
1616
'rpc_calls' => ['descr' => 'calls', 'colour' => '000000'],
1717
'rpc_badcalls' => ['descr' => 'bad calls', 'colour' => '600604'],

includes/html/graphs/application/nfs-v3-stats_stats.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$printtotal = 0;
1212
$addarea = 1;
1313
$transparency = 33;
14-
$rrd_filename = Rrd::dirFromHost($device['hostname']) . '/app-nfs-stats-' . $app->app_id . '.rrd';
14+
$rrd_filename = Rrd::name($device['hostname'], ['app', 'nfs-stats', $app->app_id]);
1515
$array = [
1616
'proc3_null' => ['descr' => 'Null', 'colour' => '630606'],
1717
'proc3_getattr' => ['descr' => 'Get attributes', 'colour' => '50C150'],

includes/html/graphs/sla-jitter-jitter.inc.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

phpstan-baseline-deprecated.neon

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6976,14 +6976,6 @@ parameters:
69766976
count: 1
69776977
path: includes/html/graphs/service/auth.inc.php
69786978

6979-
-
6980-
message: """
6981-
#^Call to deprecated function dbFetchRow\\(\\)\\:
6982-
Please use Eloquent instead; https\\://laravel\\.com/docs/eloquent$#
6983-
"""
6984-
count: 1
6985-
path: includes/html/graphs/sla-jitter-jitter.inc.php
6986-
69876979
-
69886980
message: """
69896981
#^Call to deprecated function dbFetchRow\\(\\)\\:

0 commit comments

Comments
 (0)