From edae75c21a8f657dd6cc9ace9e8e844ef337a951 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sat, 3 May 2014 18:15:12 +0200 Subject: rename ds_names and dsname to legend This had nothing to do with an RRD data source. --- plugin/nut.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugin/nut.php') diff --git a/plugin/nut.php b/plugin/nut.php index f8d7150..eb2ceb2 100644 --- a/plugin/nut.php +++ b/plugin/nut.php @@ -21,7 +21,7 @@ switch($obj->args['type']) { } else { $obj->data_sources = array('value'); } - $obj->ds_names = array('output' => 'Output'); + $obj->legend = array('output' => 'Output'); $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'Hz'; $obj->rrd_format = '%5.1lf%s'; @@ -32,7 +32,7 @@ switch($obj->args['type']) { } else { $obj->data_sources = array('value'); } - $obj->ds_names = array('charge' => 'Charge', + $obj->legend = array('charge' => 'Charge', 'load' => 'Load'); $obj->rrd_title = sprintf('Charge & load (%s)', $obj->args['pinstance']); $obj->rrd_vertical = '%'; @@ -40,14 +40,14 @@ switch($obj->args['type']) { break; case 'power': $obj->data_sources = array('value'); - $obj->ds_names = array('ups' => 'UPS'); + $obj->legend = array('ups' => 'UPS'); $obj->rrd_title = sprintf('Power (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'VA'; $obj->rrd_format = '%5.1lf%s'; break; case 'temperature': $obj->data_sources = array('value'); - $obj->ds_names = array('battery' => 'Battery'); + $obj->legend = array('battery' => 'Battery'); $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); $obj->rrd_vertical = '°C'; $obj->rrd_format = '%5.1lf%s'; @@ -58,14 +58,14 @@ switch($obj->args['type']) { } else { $obj->data_sources = array('value'); } - $obj->ds_names = array('timeleft' => 'Timeleft'); + $obj->legend = array('timeleft' => 'Timeleft'); $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'Seconds'; $obj->rrd_format = '%5.1lf'; break; case 'voltage': $obj->data_sources = array('value'); - $obj->ds_names = array('battery' => 'Battery', + $obj->legend = array('battery' => 'Battery', 'input' => 'Input', 'output' => 'Output'); $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); -- cgit v1.1