From 0c54fa40722133895fcff324f6c41c219d55977a Mon Sep 17 00:00:00 2001 From: Manuel CISSÉ Date: Tue, 23 Feb 2010 17:35:11 +0100 Subject: automatically generate colors for graphs (sensor plugin) --- plugin/sensors.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugin/sensors.php') 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( ); $obj->width = $width; $obj->heigth = $heigth; +$obj->generate_colors(); switch($obj->args['type']) { case 'fanspeed': - $obj->colors = '00ff00'; $obj->rrd_title = sprintf('Fanspeed (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'RPM'; $obj->rrd_format = '%5.1lf'; break; case 'temperature': - $obj->colors = '0000ff'; $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'Celius'; $obj->rrd_format = '%5.1lf%s'; break; case 'voltage': - $obj->colors = 'ff0000'; $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); $obj->rrd_vertical = 'Volt'; $obj->rrd_format = '%5.1lf'; -- cgit v1.1