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/apache.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/apache.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugin/apache.php b/plugin/apache.php index df7fe49..6fa9963 100644 --- a/plugin/apache.php +++ b/plugin/apache.php | |||
| @@ -17,7 +17,7 @@ $obj = new Type_Default($CONFIG, $_GET); | |||
| 17 | switch ($obj->args['type']) { | 17 | switch ($obj->args['type']) { |
| 18 | case 'apache_bytes': | 18 | case 'apache_bytes': |
| 19 | $obj->data_sources = array('value'); | 19 | $obj->data_sources = array('value'); |
| 20 | $obj->ds_names = array( | 20 | $obj->legend = array( |
| 21 | 'value' => sprintf('%s/s', ucfirst($CONFIG['network_datasize'])), | 21 | 'value' => sprintf('%s/s', ucfirst($CONFIG['network_datasize'])), |
| 22 | ); | 22 | ); |
| 23 | $obj->colors = array( | 23 | $obj->colors = array( |
| @@ -30,7 +30,7 @@ switch ($obj->args['type']) { | |||
| 30 | break; | 30 | break; |
| 31 | case 'apache_connections': | 31 | case 'apache_connections': |
| 32 | $obj->data_sources = array('value'); | 32 | $obj->data_sources = array('value'); |
| 33 | $obj->ds_names = array( | 33 | $obj->legend = array( |
| 34 | 'value' => 'Conns/s', | 34 | 'value' => 'Conns/s', |
| 35 | ); | 35 | ); |
| 36 | $obj->colors = array( | 36 | $obj->colors = array( |
| @@ -42,7 +42,7 @@ switch ($obj->args['type']) { | |||
| 42 | break; | 42 | break; |
| 43 | case 'apache_idle_workers': | 43 | case 'apache_idle_workers': |
| 44 | $obj->data_sources = array('value'); | 44 | $obj->data_sources = array('value'); |
| 45 | $obj->ds_names = array( | 45 | $obj->legend = array( |
| 46 | 'value' => 'Workers', | 46 | 'value' => 'Workers', |
| 47 | ); | 47 | ); |
| 48 | $obj->colors = array( | 48 | $obj->colors = array( |
| @@ -54,7 +54,7 @@ switch ($obj->args['type']) { | |||
| 54 | break; | 54 | break; |
| 55 | case 'apache_requests': | 55 | case 'apache_requests': |
| 56 | $obj->data_sources = array('value'); | 56 | $obj->data_sources = array('value'); |
| 57 | $obj->ds_names = array( | 57 | $obj->legend = array( |
| 58 | 'value' => 'Requests/s', | 58 | 'value' => 'Requests/s', |
| 59 | ); | 59 | ); |
| 60 | $obj->colors = array( | 60 | $obj->colors = array( |
| @@ -93,7 +93,7 @@ switch ($obj->args['type']) { | |||
| 93 | 'read', | 93 | 'read', |
| 94 | 'request_start', | 94 | 'request_start', |
| 95 | ); | 95 | ); |
| 96 | $obj->ds_names = array( | 96 | $obj->legend = array( |
| 97 | 'open' => 'Open (empty)', | 97 | 'open' => 'Open (empty)', |
| 98 | 'waiting' => 'Waiting', | 98 | 'waiting' => 'Waiting', |
| 99 | 'starting' => 'Starting up', | 99 | 'starting' => 'Starting up', |
| @@ -154,9 +154,9 @@ $obj->rrd_format = '%5.1lf'; | |||
| 154 | # backwards compatibility | 154 | # backwards compatibility |
| 155 | if ($CONFIG['version'] < 5) { | 155 | if ($CONFIG['version'] < 5) { |
| 156 | $obj->data_sources = array('count'); | 156 | $obj->data_sources = array('count'); |
| 157 | if (count($obj->ds_names) == 1) { | 157 | if (count($obj->legend) == 1) { |
| 158 | $obj->ds_names['count'] = $obj->ds_names['value']; | 158 | $obj->legend['count'] = $obj->legend['value']; |
| 159 | unset($obj->ds_names['value']); | 159 | unset($obj->legend['value']); |
| 160 | } | 160 | } |
| 161 | if (count($obj->colors) == 1) { | 161 | if (count($obj->colors) == 1) { |
| 162 | $obj->colors['count'] = $obj->colors['value']; | 162 | $obj->colors['count'] = $obj->colors['value']; |
