mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Storage RRD - descriptionlength fix - percent column fix (#10607)
* Storage RRD - descriptionlength fix - percent column fix * changed percentage column description * increase also column length on furhter graphs * fix column title length
This commit is contained in:
committed by
Tony Murray
parent
71f7323550
commit
ee2a847c0b
@@ -6,7 +6,7 @@ $scale_max = '100';
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$iter = '1';
|
||||
$rrd_options .= " COMMENT:' Size Used %age\\l'";
|
||||
$rrd_options .= " COMMENT:' Size Used % Used\\l'";
|
||||
|
||||
foreach (dbFetchRows('SELECT * FROM storage where device_id = ?', array($device['device_id'])) as $storage) {
|
||||
// FIXME generic colour function
|
||||
@@ -27,7 +27,7 @@ foreach (dbFetchRows('SELECT * FROM storage where device_id = ?', array($device[
|
||||
$iter = '0';
|
||||
}
|
||||
|
||||
$descr = rrdtool_escape($storage['storage_descr'], 12);
|
||||
$descr = rrdtool_escape($storage['storage_descr'], 16);
|
||||
$rrd = rrd_name($device['hostname'], array('storage', $storage['storage_mib'], $storage['storage_descr']));
|
||||
$rrd_options .= " DEF:{$storage['storage_id']}used=$rrd:used:AVERAGE";
|
||||
$rrd_options .= " DEF:{$storage['storage_id']}free=$rrd:free:AVERAGE";
|
||||
|
||||
@@ -9,14 +9,14 @@ $rrd_options .= ' -b 1024';
|
||||
|
||||
$iter = '1';
|
||||
|
||||
$rrd_options .= " COMMENT:' Size Free % Used\\n'";
|
||||
$rrd_options .= " COMMENT:' Size Free % Used\\n'";
|
||||
|
||||
$hostname = gethostbyid($storage['device_id']);
|
||||
|
||||
$colour = 'CC0000';
|
||||
$colour_area = 'ffaaaa';
|
||||
|
||||
$descr = rrdtool_escape($storage['storage_descr'], 12);
|
||||
$descr = rrdtool_escape($storage['storage_descr'], 16);
|
||||
|
||||
$percentage = round($storage['storage_perc'], 0);
|
||||
|
||||
@@ -33,7 +33,7 @@ $rrd_options .= ' GPRINT:free:LAST:%6.2lf%sB';
|
||||
$rrd_options .= " GPRINT:perc:LAST:%5.2lf%%\\n";
|
||||
|
||||
if ($_GET['previous']) {
|
||||
$descr = rrdtool_escape('Prev '.$storage['storage_descr'], 12);
|
||||
$descr = rrdtool_escape('Prev '.$storage['storage_descr'], 16);
|
||||
|
||||
$colour = '99999999';
|
||||
$colour_area = '66666666';
|
||||
|
||||
Reference in New Issue
Block a user