diff options
Diffstat (limited to 'plugin/apcups.php')
| -rw-r--r-- | plugin/apcups.php | 16 |
1 files changed, 8 insertions, 8 deletions
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); | |||
| 21 | switch($obj->args['type']) { | 21 | switch($obj->args['type']) { |
| 22 | case 'charge': | 22 | case 'charge': |
| 23 | $obj->data_sources = array('value'); | 23 | $obj->data_sources = array('value'); |
| 24 | $obj->ds_names = array('value' => 'Charge'); | 24 | $obj->legend = array('value' => 'Charge'); |
| 25 | $obj->colors = array('value' => '0000f0'); | 25 | $obj->colors = array('value' => '0000f0'); |
| 26 | $obj->rrd_title = sprintf('UPS Charge'); | 26 | $obj->rrd_title = sprintf('UPS Charge'); |
| 27 | $obj->rrd_vertical = 'Ampere hours'; | 27 | $obj->rrd_vertical = 'Ampere hours'; |
| 28 | break; | 28 | break; |
| 29 | case 'frequency': | 29 | case 'frequency': |
| 30 | $obj->data_sources = array('value'); | 30 | $obj->data_sources = array('value'); |
| 31 | $obj->ds_names = array('value' => 'Input Frequency'); | 31 | $obj->legend = array('value' => 'Input Frequency'); |
| 32 | $obj->colors = array('value' => '0000f0'); | 32 | $obj->colors = array('value' => '0000f0'); |
| 33 | $obj->rrd_title = sprintf('UPS Input Frequency'); | 33 | $obj->rrd_title = sprintf('UPS Input Frequency'); |
| 34 | $obj->rrd_vertical = 'Hertz'; | 34 | $obj->rrd_vertical = 'Hertz'; |
| 35 | break; | 35 | break; |
| 36 | case 'percent': | 36 | case 'percent': |
| 37 | $obj->data_sources = array('value'); | 37 | $obj->data_sources = array('value'); |
| 38 | $obj->ds_names = array('value' => 'Load'); | 38 | $obj->legend = array('value' => 'Load'); |
| 39 | $obj->colors = array('value' => '0000f0'); | 39 | $obj->colors = array('value' => '0000f0'); |
| 40 | $obj->rrd_title = sprintf('UPS Load'); | 40 | $obj->rrd_title = sprintf('UPS Load'); |
| 41 | $obj->rrd_vertical = 'Percent'; | 41 | $obj->rrd_vertical = 'Percent'; |
| 42 | break; | 42 | break; |
| 43 | case 'temperature': | 43 | case 'temperature': |
| 44 | $obj->data_sources = array('value'); | 44 | $obj->data_sources = array('value'); |
| 45 | $obj->ds_names = array('value' => 'Temperature'); | 45 | $obj->legend = array('value' => 'Temperature'); |
| 46 | $obj->colors = array('value' => '0000f0'); | 46 | $obj->colors = array('value' => '0000f0'); |
| 47 | $obj->rrd_title = sprintf('UPS Temperature'); | 47 | $obj->rrd_title = sprintf('UPS Temperature'); |
| 48 | $obj->rrd_vertical = 'Celsius'; | 48 | $obj->rrd_vertical = 'Celsius'; |
| 49 | break; | 49 | break; |
| 50 | case 'timeleft': | 50 | case 'timeleft': |
| 51 | $obj->data_sources = array('value'); | 51 | $obj->data_sources = array('value'); |
| 52 | $obj->ds_names = array('value' => 'Time Left'); | 52 | $obj->legend = array('value' => 'Time Left'); |
| 53 | $obj->colors = array('value' => '0000f0'); | 53 | $obj->colors = array('value' => '0000f0'); |
| 54 | $obj->rrd_title = sprintf('UPS Time Left'); | 54 | $obj->rrd_title = sprintf('UPS Time Left'); |
| 55 | $obj->rrd_vertical = 'Seconds'; | 55 | $obj->rrd_vertical = 'Seconds'; |
| 56 | break; | 56 | break; |
| 57 | case 'voltage': | 57 | case 'voltage': |
| 58 | $obj->order = array('battery', 'input', 'output'); | 58 | $obj->order = array('battery', 'input', 'output'); |
| 59 | $obj->ds_names = array( | 59 | $obj->legend = array( |
| 60 | 'battery' => 'Battery Voltage', | 60 | 'battery' => 'Battery Voltage', |
| 61 | 'input' => 'Input Voltage', | 61 | 'input' => 'Input Voltage', |
| 62 | 'output' => 'Output Voltage' | 62 | 'output' => 'Output Voltage' |
| @@ -78,8 +78,8 @@ if ($CONFIG['version'] < 5 && | |||
| 78 | 78 | ||
| 79 | $obj->data_sources = array($obj->args['type']); | 79 | $obj->data_sources = array($obj->args['type']); |
| 80 | 80 | ||
| 81 | $obj->ds_names[$obj->args['type']] = $obj->ds_names['value']; | 81 | $obj->legend[$obj->args['type']] = $obj->legend['value']; |
| 82 | unset($obj->ds_names['value']); | 82 | unset($obj->legend['value']); |
| 83 | 83 | ||
| 84 | $obj->colors[$obj->args['type']] = $obj->colors['value']; | 84 | $obj->colors[$obj->args['type']] = $obj->colors['value']; |
| 85 | unset($obj->colors['value']); | 85 | unset($obj->colors['value']); |
