aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
authorManuel CISSÉ2013-05-29 11:08:47 +0200
committerManuel CISSÉ2013-05-29 11:08:47 +0200
commit1d69a5d18ff6b37d396951a8fd144f95f337a4bf (patch)
tree2cf610d4c3d34daca25698bb75ced03faa423b93 /plugin
parentplugin/nut: collectd 5 compatibility + Add frequency graph (diff)
downloadapt-panopticon_cgp-1d69a5d18ff6b37d396951a8fd144f95f337a4bf.zip
apt-panopticon_cgp-1d69a5d18ff6b37d396951a8fd144f95f337a4bf.tar.gz
apt-panopticon_cgp-1d69a5d18ff6b37d396951a8fd144f95f337a4bf.tar.bz2
apt-panopticon_cgp-1d69a5d18ff6b37d396951a8fd144f95f337a4bf.tar.xz
plugin/nut: collectd 5 compatibility for timeleft graph
Diffstat (limited to 'plugin')
-rw-r--r--plugin/nut.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/nut.php b/plugin/nut.php
index e97233c..927865a 100644
--- a/plugin/nut.php
+++ b/plugin/nut.php
@@ -45,7 +45,11 @@ switch($obj->args['type']) {
45 $obj->rrd_format = '%5.1lf%s'; 45 $obj->rrd_format = '%5.1lf%s';
46 break; 46 break;
47 case 'timeleft': 47 case 'timeleft':
48 $obj->data_sources = array('timeleft'); 48 if ($CONFIG['version'] < 5) {
49 $obj->data_sources = array('timeleft');
50 } else {
51 $obj->data_sources = array('value');
52 }
49 $obj->ds_names = array('timeleft' => 'Timeleft'); 53 $obj->ds_names = array('timeleft' => 'Timeleft');
50 $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); 54 $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']);
51 $obj->rrd_vertical = 'Seconds'; 55 $obj->rrd_vertical = 'Seconds';