diff --git a/html/includes/graphs/sensor/temperature.inc.php b/html/includes/graphs/sensor/temperature.inc.php index d0b8da519c..48a6b91388 100644 --- a/html/includes/graphs/sensor/temperature.inc.php +++ b/html/includes/graphs/sensor/temperature.inc.php @@ -11,7 +11,7 @@ include("includes/graphs/common.inc.php"); $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/temp-" . safename($sensor['sensor_type']."-".$sensor['sensor_index']) . ".rrd"; - $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 22),0,22); + $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 21),0,21); $sensor['sensor_descr_fixed'] = str_replace(':','\:',str_replace('\*','*',$sensor['sensor_descr_fixed'])); $rrd_options .= " DEF:temp=$rrd_filename:temp:AVERAGE"; @@ -27,10 +27,10 @@ include("includes/graphs/common.inc.php"); # $rrd_options .= " AREA:tempcold#CCCCFF"; # $rrd_options .= " LINE1:temp#cc0000:'" . str_replace(':','\:',str_replace('\*','*',quotemeta($sensor['sensor_descr_fixed'])))."'"; # Ugly hack :( - $rrd_options .= " LINE1:temp#cc0000:'" . $sensor['sensor_descr_fixed']."'"; - $rrd_options .= " LINE1:tempwarm#660000"; + $rrd_options .= " LINE1.5:temp#cc0000:'" . $sensor['sensor_descr_fixed']."'"; +# $rrd_options .= " LINE1.5:tempwarm#660000"; $rrd_options .= " GPRINT:temp:LAST:%4.1lfC"; - $rrd_options .= " GPRINT:temp:MIN:%4.1lfC"; - $rrd_options .= " GPRINT:temp:MAX:%4.1lfC\\\\l"; + $rrd_options .= " GPRINT:temp_min:MIN:%4.1lfC"; + $rrd_options .= " GPRINT:temp_max:MAX:%4.1lfC\\\\l"; ?> diff --git a/html/includes/graphs/sensor/voltage.inc.php b/html/includes/graphs/sensor/voltage.inc.php index 239b27f413..5a27b221d5 100644 --- a/html/includes/graphs/sensor/voltage.inc.php +++ b/html/includes/graphs/sensor/voltage.inc.php @@ -21,7 +21,7 @@ $rrd_options .= " AREA:volt_min#ffffffff"; #$rrd_options .= " AREA:volt#FFFF99"; $rrd_options .= " LINE1.5:volt#cc0000:'" . $sensor['sensor_descr_fixed']."'"; -$rrd_options .= " GPRINT:volt:LAST:%3.2lfV"; -$rrd_options .= " GPRINT:volt:MAX:%3.2lfV\\\\l"; +$rrd_options .= " GPRINT:volt:LAST:%6.2lfV"; +$rrd_options .= " GPRINT:volt:MAX:%6.2lfV\\\\l"; ?> diff --git a/html/pages/device/health/temperatures.inc.php b/html/pages/device/health/temperatures.inc.php index 8769268a52..ed94522431 100644 --- a/html/pages/device/health/temperatures.inc.php +++ b/html/pages/device/health/temperatures.inc.php @@ -12,13 +12,14 @@ while($temp = mysql_fetch_array($query)) { if(!is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } echo(" - " . $temp['sensor_descr'] . " - " . $temp['sensor_type'] . " - " . print_temperature($temp['sensor_current'], $temp['sensor_limit']) . " °C - " . $temp['sensor_limit'] . " °C + " . $temp['sensor_descr'] . " + " . $temp['sensor_type'] . " + " . print_temperature($temp['sensor_current'], $temp['sensor_limit']) . "°C + " . $temp['sensor_limit'] . "°C + " . $temp['sensor_limit_low'] . "°C " . $temp['sensor_notes'] . " \n"); - echo(""); + echo(""); $graph_type = "sensor_temperature"; diff --git a/html/pages/device/overview/current.inc.php b/html/pages/device/overview/current.inc.php index 3c3f6ce1e1..fe4ad65a22 100644 --- a/html/pages/device/overview/current.inc.php +++ b/html/pages/device/overview/current.inc.php @@ -9,8 +9,6 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $i = '1'; $currents = mysql_query("SELECT * FROM sensors WHERE sensor_class='current' AND device_id = '" . $device['device_id'] . "'"); echo(""); - echo(""); - echo("
"); - echo(""); while($current = mysql_fetch_array($currents)) { if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } @@ -32,12 +30,9 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $current['sensor_descr'] = truncate($current['sensor_descr'], 25, ''); echo(""); - if($i == $rows) { echo("
$current_link_a$current_link_b$current_link_c
"); } $i++; } echo("
"); - echo("
"); echo(""); } diff --git a/html/pages/device/overview/fanspeeds.inc.php b/html/pages/device/overview/fanspeeds.inc.php index ba3ed4b0bd..761a4a4f46 100644 --- a/html/pages/device/overview/fanspeeds.inc.php +++ b/html/pages/device/overview/fanspeeds.inc.php @@ -9,8 +9,6 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $i = '1'; $fans = mysql_query("SELECT * FROM sensors WHERE sensor_class='fanspeed' AND device_id = '" . $device['device_id'] . "'"); echo(""); - echo(""); - echo("
"); - echo(""); while($fan = mysql_fetch_array($fans)) { if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } @@ -32,12 +30,9 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $fan['sensor_descr'] = truncate($fan['sensor_descr'], 25, ''); echo(""); - if($i == $rows) { echo("
$fan_link_a$fan_link_b$fan_link_c
"); } $i++; } echo("
"); - echo("
"); echo(""); } diff --git a/html/pages/device/overview/frequencies.inc.php b/html/pages/device/overview/frequencies.inc.php index 2045aa5db3..eec1c2677b 100644 --- a/html/pages/device/overview/frequencies.inc.php +++ b/html/pages/device/overview/frequencies.inc.php @@ -9,8 +9,6 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $i = '1'; $temps = mysql_query("SELECT * FROM sensors WHERE sensor_class='freq' AND device_id = '" . $device['device_id'] . "' ORDER BY sensor_index"); echo(''); - echo('"); - echo("
'); - echo(''); while($temp = mysql_fetch_array($temps)) { if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } @@ -34,12 +32,9 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $temp['sensor_descr'] = truncate($temp['sensor_descr'], 25, ''); echo(""); - if($i == $rows) { echo("
$temp_link_a$temp_link_b$temp_link_c
"); } $i++; } echo("
"); - echo("
"); echo(""); } diff --git a/html/pages/device/overview/temperatures.inc.php b/html/pages/device/overview/temperatures.inc.php index 24cea88ab5..a9f30b2bda 100644 --- a/html/pages/device/overview/temperatures.inc.php +++ b/html/pages/device/overview/temperatures.inc.php @@ -9,8 +9,6 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $i = '1'; $temps = mysql_query("SELECT * FROM sensors WHERE sensor_class='temperature' AND device_id = '" . $device['device_id'] . "' ORDER BY sensor_index"); echo(''); - echo('"); - echo("
'); - echo(''); while($temp = mysql_fetch_array($temps)) { if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } @@ -23,23 +21,22 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $temp_month = "graph.php?id=" . $temp['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=300&height=100"; $temp_year = "graph.php?id=" . $temp['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=300&height=100"; $temp_minigraph = ""; + $temp_minigraph_b = ""; + $temp_link = ""; $temp_link_c = $temp_link . "" . round($temp['sensor_current'],0) . "°C"; - $temp_link_b = $temp_link . $temp_minigraph . ""; + $temp_link_b = $temp_link . $temp_minigraph . " " . $temp_minigraph_b . ""; $temp_link_a = $temp_link . $temp['sensor_descr'] . ""; $temp['sensor_descr'] = truncate($temp['sensor_descr'], 25, ''); - echo(""); - if($i == $rows) { echo("
$temp_link_a$temp_link_b$temp_link_c
"); } + echo(""); $i++; } echo("
$temp_link_a$temp_link_b$temp_link_c
"); - echo("
"); echo(""); } diff --git a/html/pages/device/overview/voltages.inc.php b/html/pages/device/overview/voltages.inc.php index 3feacaf64b..986eee9c18 100644 --- a/html/pages/device/overview/voltages.inc.php +++ b/html/pages/device/overview/voltages.inc.php @@ -9,8 +9,6 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $i = '1'; $volts = mysql_query("SELECT * FROM sensors WHERE sensor_class='voltage' AND device_id = '" . $device['device_id'] . "'"); echo(""); - echo(""); - echo("
"); - echo(""); while($volt = mysql_fetch_array($volts)) { if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } @@ -32,12 +30,9 @@ if($total = mysql_result(mysql_query("SELECT count(sensor_id) from sensors WHERE $volt['sensor_descr'] = truncate($volt['sensor_descr'], 25, ''); echo(""); - if($i == $rows) { echo("
$volt_link_a$volt_link_b$volt_link_c
"); } $i++; } echo("
"); - echo("
"); echo(""); } diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 9c31042767..470a0f9c00 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -1,14 +1,15 @@