mirror of
https://github.com/librenms/librenms.git
synced 2024-09-27 05:18:10 +00:00
order temperature by index on device overview
git-svn-id: http://www.observium.org/svn/observer/trunk@1116 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
a1b5886a46
commit
b3ac4c4451
@ -1,16 +1,15 @@
|
||||
<?php
|
||||
|
||||
unset($temp_seperator);
|
||||
if(mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
||||
$total = mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"),0);
|
||||
if($total = mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"),0)) {
|
||||
$rows = round($total / 2,0);
|
||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/temperature.png'> Temperatures</p>");
|
||||
$i = '1';
|
||||
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "'");
|
||||
echo("<table width=100% valign=top>");
|
||||
echo("<tr><td width=50%>");
|
||||
echo("<table width=100% cellspacing=0 cellpadding=2>");
|
||||
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "' ORDER BY temp_index");
|
||||
echo('<table width="100%" valign="top">');
|
||||
echo('<tr><td width="50%">');
|
||||
echo('<table width="100%" cellspacing="0" cellpadding="2">');
|
||||
while($temp = mysql_fetch_array($temps)) {
|
||||
if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user