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/apcups.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugin/apcups.php') diff --git a/plugin/apcups.php b/plugin/apcups.php index 626b8f4..853f0ed 100644 --- a/plugin/apcups.php +++ b/plugin/apcups.php @@ -21,42 +21,42 @@ $obj = new Type_Default($CONFIG, $_GET); switch($obj->args['type']) { case 'charge': $obj->data_sources = array('value'); - $obj->ds_names = array('value' => 'Charge'); + $obj->legend = array('value' => 'Charge'); $obj->colors = array('value' => '0000f0'); $obj->rrd_title = sprintf('UPS Charge'); $obj->rrd_vertical = 'Ampere hours'; break; case 'frequency': $obj->data_sources = array('value'); - $obj->ds_names = array('value' => 'Input Frequency'); + $obj->legend = array('value' => 'Input Frequency'); $obj->colors = array('value' => '0000f0'); $obj->rrd_title = sprintf('UPS Input Frequency'); $obj->rrd_vertical = 'Hertz'; break; case 'percent': $obj->data_sources = array('value'); - $obj->ds_names = array('value' => 'Load'); + $obj->legend = array('value' => 'Load'); $obj->colors = array('value' => '0000f0'); $obj->rrd_title = sprintf('UPS Load'); $obj->rrd_vertical = 'Percent'; break; case 'temperature': $obj->data_sources = array('value'); - $obj->ds_names = array('value' => 'Temperature'); + $obj->legend = array('value' => 'Temperature'); $obj->colors = array('value' => '0000f0'); $obj->rrd_title = sprintf('UPS Temperature'); $obj->rrd_vertical = 'Celsius'; break; case 'timeleft': $obj->data_sources = array('value'); - $obj->ds_names = array('value' => 'Time Left'); + $obj->legend = array('value' => 'Time Left'); $obj->colors = array('value' => '0000f0'); $obj->rrd_title = sprintf('UPS Time Left'); $obj->rrd_vertical = 'Seconds'; break; case 'voltage': $obj->order = array('battery', 'input', 'output'); - $obj->ds_names = array( + $obj->legend = array( 'battery' => 'Battery Voltage', 'input' => 'Input Voltage', 'output' => 'Output Voltage' @@ -78,8 +78,8 @@ if ($CONFIG['version'] < 5 && $obj->data_sources = array($obj->args['type']); - $obj->ds_names[$obj->args['type']] = $obj->ds_names['value']; - unset($obj->ds_names['value']); + $obj->legend[$obj->args['type']] = $obj->legend['value']; + unset($obj->legend['value']); $obj->colors[$obj->args['type']] = $obj->colors['value']; unset($obj->colors['value']); -- cgit v1.1