aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin/sensors.php
diff options
context:
space:
mode:
authorManuel CISSÉ2010-02-23 17:35:11 +0100
committerPim van den Berg2010-03-01 21:00:47 +0100
commit0c54fa40722133895fcff324f6c41c219d55977a (patch)
tree928342542bb646578f693a33806eeea8c41883ea /plugin/sensors.php
parentadd vmem plugin (diff)
downloadapt-panopticon_cgp-0c54fa40722133895fcff324f6c41c219d55977a.zip
apt-panopticon_cgp-0c54fa40722133895fcff324f6c41c219d55977a.tar.gz
apt-panopticon_cgp-0c54fa40722133895fcff324f6c41c219d55977a.tar.bz2
apt-panopticon_cgp-0c54fa40722133895fcff324f6c41c219d55977a.tar.xz
automatically generate colors for graphs (sensor plugin)
Diffstat (limited to 'plugin/sensors.php')
-rw-r--r--plugin/sensors.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugin/sensors.php b/plugin/sensors.php
index 29110f1..6d5323a 100644
--- a/plugin/sensors.php
+++ b/plugin/sensors.php
@@ -18,21 +18,19 @@ $obj->ds_names = array(
18); 18);
19$obj->width = $width; 19$obj->width = $width;
20$obj->heigth = $heigth; 20$obj->heigth = $heigth;
21$obj->generate_colors();
21switch($obj->args['type']) { 22switch($obj->args['type']) {
22 case 'fanspeed': 23 case 'fanspeed':
23 $obj->colors = '00ff00';
24 $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']); 24 $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']);
25 $obj->rrd_vertical = 'RPM'; 25 $obj->rrd_vertical = 'RPM';
26 $obj->rrd_format = '%5.1lf'; 26 $obj->rrd_format = '%5.1lf';
27 break; 27 break;
28 case 'temperature': 28 case 'temperature':
29 $obj->colors = '0000ff';
30 $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); 29 $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']);
31 $obj->rrd_vertical = 'Celius'; 30 $obj->rrd_vertical = 'Celius';
32 $obj->rrd_format = '%5.1lf%s'; 31 $obj->rrd_format = '%5.1lf%s';
33 break; 32 break;
34 case 'voltage': 33 case 'voltage':
35 $obj->colors = 'ff0000';
36 $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); 34 $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']);
37 $obj->rrd_vertical = 'Volt'; 35 $obj->rrd_vertical = 'Volt';
38 $obj->rrd_format = '%5.1lf'; 36 $obj->rrd_format = '%5.1lf';