mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 16:01:56 +02: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:
@@ -1,16 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
unset($temp_seperator);
|
unset($temp_seperator);
|
||||||
if(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)) {
|
||||||
$total = mysql_result(mysql_query("SELECT count(temp_id) from temperature WHERE device_id = '" . $device['device_id'] . "'"),0);
|
|
||||||
$rows = round($total / 2,0);
|
$rows = round($total / 2,0);
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
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>");
|
echo("<p style='padding: 0px 5px 5px;' class=sectionhead><img align='absmiddle' src='".$config['base_url']."/images/icons/temperature.png'> Temperatures</p>");
|
||||||
$i = '1';
|
$i = '1';
|
||||||
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "'");
|
$temps = mysql_query("SELECT * FROM temperature WHERE device_id = '" . $device['device_id'] . "' ORDER BY temp_index");
|
||||||
echo("<table width=100% valign=top>");
|
echo('<table width="100%" valign="top">');
|
||||||
echo("<tr><td width=50%>");
|
echo('<tr><td width="50%">');
|
||||||
echo("<table width=100% cellspacing=0 cellpadding=2>");
|
echo('<table width="100%" cellspacing="0" cellpadding="2">');
|
||||||
while($temp = mysql_fetch_array($temps)) {
|
while($temp = mysql_fetch_array($temps)) {
|
||||||
if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user