diff options
author | Pim van den Berg | 2011-06-26 21:14:51 +0200 |
---|---|---|
committer | Pim van den Berg | 2011-06-26 21:17:11 +0200 |
commit | a5242158176268e733d1f481602aa5ec298dada7 (patch) | |
tree | 2c49501c197ad37ee1ad912cd7aa9731d7182052 /plugin/users.php | |
parent | plugin/dns: add dns reply code (diff) | |
download | apt-panopticon_cgp-a5242158176268e733d1f481602aa5ec298dada7.zip apt-panopticon_cgp-a5242158176268e733d1f481602aa5ec298dada7.tar.gz apt-panopticon_cgp-a5242158176268e733d1f481602aa5ec298dada7.tar.bz2 apt-panopticon_cgp-a5242158176268e733d1f481602aa5ec298dada7.tar.xz |
type/Default: dont use t as ti when no ti is set
Use 'value' instead.
Diffstat (limited to 'plugin/users.php')
-rw-r--r-- | plugin/users.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugin/users.php b/plugin/users.php index a4558b5..a948fc1 100644 --- a/plugin/users.php +++ b/plugin/users.php | |||
@@ -12,10 +12,10 @@ require_once 'inc/collectd.inc.php'; | |||
12 | $obj = new Type_Default($CONFIG); | 12 | $obj = new Type_Default($CONFIG); |
13 | $obj->data_sources = array('value'); | 13 | $obj->data_sources = array('value'); |
14 | $obj->ds_names = array( | 14 | $obj->ds_names = array( |
15 | 'users' => 'Users', | 15 | 'value' => 'Users', |
16 | ); | 16 | ); |
17 | $obj->colors = array( | 17 | $obj->colors = array( |
18 | 'users' => '0000f0', | 18 | 'value' => '0000f0', |
19 | ); | 19 | ); |
20 | $obj->width = $width; | 20 | $obj->width = $width; |
21 | $obj->heigth = $heigth; | 21 | $obj->heigth = $heigth; |
@@ -24,8 +24,15 @@ $obj->rrd_vertical = 'Users'; | |||
24 | $obj->rrd_format = '%.1lf'; | 24 | $obj->rrd_format = '%.1lf'; |
25 | 25 | ||
26 | # backwards compatibility | 26 | # backwards compatibility |
27 | if ($CONFIG['version'] < 5) | 27 | if ($CONFIG['version'] < 5) { |
28 | $obj->data_sources = array('users'); | 28 | $obj->data_sources = array('users'); |
29 | 29 | ||
30 | $obj->ds_names['users'] = $obj->ds_names['value']; | ||
31 | unset($obj->ds_names['value']); | ||
32 | |||
33 | $obj->colors['users'] = $obj->colors['value']; | ||
34 | unset($obj->colors['value']); | ||
35 | } | ||
36 | |||
30 | collectd_flush($obj->identifiers); | 37 | collectd_flush($obj->identifiers); |
31 | $obj->rrd_graph(); | 38 | $obj->rrd_graph(); |