diff options
| author | Pim van den Berg | 2014-05-03 18:15:12 +0200 |
|---|---|---|
| committer | Pim van den Berg | 2014-05-03 19:21:36 +0200 |
| commit | edae75c21a8f657dd6cc9ace9e8e844ef337a951 (patch) | |
| tree | da0c2b4a1ef35a3d2d8c129925e257f6a6f7fbe3 /plugin/nut.php | |
| parent | type/base: set default values for rrd_title and rrd_format (diff) | |
| download | apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.zip apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.tar.gz apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.tar.bz2 apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.tar.xz | |
rename ds_names and dsname to legend
This had nothing to do with an RRD data source.
Diffstat (limited to '')
| -rw-r--r-- | plugin/nut.php | 12 |
1 files changed, 6 insertions, 6 deletions
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']) { | |||
| 21 | } else { | 21 | } else { |
| 22 | $obj->data_sources = array('value'); | 22 | $obj->data_sources = array('value'); |
| 23 | } | 23 | } |
| 24 | $obj->ds_names = array('output' => 'Output'); | 24 | $obj->legend = array('output' => 'Output'); |
| 25 | $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); | 25 | $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); |
| 26 | $obj->rrd_vertical = 'Hz'; | 26 | $obj->rrd_vertical = 'Hz'; |
| 27 | $obj->rrd_format = '%5.1lf%s'; | 27 | $obj->rrd_format = '%5.1lf%s'; |
| @@ -32,7 +32,7 @@ switch($obj->args['type']) { | |||
| 32 | } else { | 32 | } else { |
| 33 | $obj->data_sources = array('value'); | 33 | $obj->data_sources = array('value'); |
| 34 | } | 34 | } |
| 35 | $obj->ds_names = array('charge' => 'Charge', | 35 | $obj->legend = array('charge' => 'Charge', |
| 36 | 'load' => 'Load'); | 36 | 'load' => 'Load'); |
| 37 | $obj->rrd_title = sprintf('Charge & load (%s)', $obj->args['pinstance']); | 37 | $obj->rrd_title = sprintf('Charge & load (%s)', $obj->args['pinstance']); |
| 38 | $obj->rrd_vertical = '%'; | 38 | $obj->rrd_vertical = '%'; |
| @@ -40,14 +40,14 @@ switch($obj->args['type']) { | |||
| 40 | break; | 40 | break; |
| 41 | case 'power': | 41 | case 'power': |
| 42 | $obj->data_sources = array('value'); | 42 | $obj->data_sources = array('value'); |
| 43 | $obj->ds_names = array('ups' => 'UPS'); | 43 | $obj->legend = array('ups' => 'UPS'); |
| 44 | $obj->rrd_title = sprintf('Power (%s)', $obj->args['pinstance']); | 44 | $obj->rrd_title = sprintf('Power (%s)', $obj->args['pinstance']); |
| 45 | $obj->rrd_vertical = 'VA'; | 45 | $obj->rrd_vertical = 'VA'; |
| 46 | $obj->rrd_format = '%5.1lf%s'; | 46 | $obj->rrd_format = '%5.1lf%s'; |
| 47 | break; | 47 | break; |
| 48 | case 'temperature': | 48 | case 'temperature': |
| 49 | $obj->data_sources = array('value'); | 49 | $obj->data_sources = array('value'); |
| 50 | $obj->ds_names = array('battery' => 'Battery'); | 50 | $obj->legend = array('battery' => 'Battery'); |
| 51 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); | 51 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); |
| 52 | $obj->rrd_vertical = '°C'; | 52 | $obj->rrd_vertical = '°C'; |
| 53 | $obj->rrd_format = '%5.1lf%s'; | 53 | $obj->rrd_format = '%5.1lf%s'; |
| @@ -58,14 +58,14 @@ switch($obj->args['type']) { | |||
| 58 | } else { | 58 | } else { |
| 59 | $obj->data_sources = array('value'); | 59 | $obj->data_sources = array('value'); |
| 60 | } | 60 | } |
| 61 | $obj->ds_names = array('timeleft' => 'Timeleft'); | 61 | $obj->legend = array('timeleft' => 'Timeleft'); |
| 62 | $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); | 62 | $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); |
| 63 | $obj->rrd_vertical = 'Seconds'; | 63 | $obj->rrd_vertical = 'Seconds'; |
| 64 | $obj->rrd_format = '%5.1lf'; | 64 | $obj->rrd_format = '%5.1lf'; |
| 65 | break; | 65 | break; |
| 66 | case 'voltage': | 66 | case 'voltage': |
| 67 | $obj->data_sources = array('value'); | 67 | $obj->data_sources = array('value'); |
| 68 | $obj->ds_names = array('battery' => 'Battery', | 68 | $obj->legend = array('battery' => 'Battery', |
| 69 | 'input' => 'Input', | 69 | 'input' => 'Input', |
| 70 | 'output' => 'Output'); | 70 | 'output' => 'Output'); |
| 71 | $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); | 71 | $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); |
