diff options
author | Pim van den Berg | 2011-04-10 19:56:08 +0200 |
---|---|---|
committer | Pim van den Berg | 2011-04-10 19:56:08 +0200 |
commit | 6bc103c0c6880673f207c87466f4fcac2645bd8c (patch) | |
tree | 829fa608416de0dea83b3c9c1689cb7077dfa943 /plugin/ping.php | |
parent | plugin: add tail plugin (diff) | |
download | apt-panopticon_cgp-6bc103c0c6880673f207c87466f4fcac2645bd8c.zip apt-panopticon_cgp-6bc103c0c6880673f207c87466f4fcac2645bd8c.tar.gz apt-panopticon_cgp-6bc103c0c6880673f207c87466f4fcac2645bd8c.tar.bz2 apt-panopticon_cgp-6bc103c0c6880673f207c87466f4fcac2645bd8c.tar.xz |
plugin: deduplicate rrd_format code
Diffstat (limited to 'plugin/ping.php')
-rw-r--r-- | plugin/ping.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugin/ping.php b/plugin/ping.php index 1ea53de..9780969 100644 --- a/plugin/ping.php +++ b/plugin/ping.php | |||
@@ -19,22 +19,21 @@ $obj->ds_names = array('ping' => 'Ping time', | |||
19 | 'ping_droprate' => 'Ping droprate'); | 19 | 'ping_droprate' => 'Ping droprate'); |
20 | $obj->width = $width; | 20 | $obj->width = $width; |
21 | $obj->heigth = $heigth; | 21 | $obj->heigth = $heigth; |
22 | $obj->rrd_format = '%5.1lf'; | ||
23 | |||
22 | switch($obj->args['type']) { | 24 | switch($obj->args['type']) { |
23 | case 'ping': | 25 | case 'ping': |
24 | $obj->data_sources = array('ping'); | 26 | $obj->data_sources = array('ping'); |
25 | $obj->rrd_title = 'Ping latency'; | 27 | $obj->rrd_title = 'Ping latency'; |
26 | $obj->rrd_vertical = 'Milliseconds'; | 28 | $obj->rrd_vertical = 'Milliseconds'; |
27 | $obj->rrd_format = '%5.1lf'; | ||
28 | break; | 29 | break; |
29 | case 'ping_stddev': | 30 | case 'ping_stddev': |
30 | $obj->rrd_title = 'Ping stddev'; | 31 | $obj->rrd_title = 'Ping stddev'; |
31 | $obj->rrd_vertical = ''; | 32 | $obj->rrd_vertical = ''; |
32 | $obj->rrd_format = '%5.1lf'; | ||
33 | break; | 33 | break; |
34 | case 'ping_droprate': | 34 | case 'ping_droprate': |
35 | $obj->rrd_title = 'Ping droprate'; | 35 | $obj->rrd_title = 'Ping droprate'; |
36 | $obj->rrd_vertical = ''; | 36 | $obj->rrd_vertical = ''; |
37 | $obj->rrd_format = '%5.1lf'; | ||
38 | break; | 37 | break; |
39 | } | 38 | } |
40 | 39 | ||