summaryrefslogtreecommitdiffstats
path: root/frontends/php/latest.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-06-09 18:44:36 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-06-09 18:44:36 +0000
commit62ebb086312e77f5f3b3d1785ace12b487c07f65 (patch)
tree33ae9ca515942597602bbf3f4f4c2ee55b9ab32a /frontends/php/latest.php
parent9c6cbde9ca8bd7dd8425b3c1b0a88387f60ee1b3 (diff)
downloadzabbix-62ebb086312e77f5f3b3d1785ace12b487c07f65.tar.gz
zabbix-62ebb086312e77f5f3b3d1785ace12b487c07f65.tar.xz
zabbix-62ebb086312e77f5f3b3d1785ace12b487c07f65.zip
- added columnt items.units (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@813 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/latest.php')
-rw-r--r--frontends/php/latest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontends/php/latest.php b/frontends/php/latest.php
index 8a1fba8e..99209b89 100644
--- a/frontends/php/latest.php
+++ b/frontends/php/latest.php
@@ -228,11 +228,11 @@
}
if(isset($HTTP_GET_VARS["select"]))
{
- $result=DBselect("select h.host,i.itemid,i.description,i.lastvalue,i.prevvalue,i.lastclock,i.status,h.hostid,i.value_type from items i,hosts h where h.hostid=i.hostid and h.status in (0,2) and i.status=0 and i.description like '%".$HTTP_GET_VARS["select"]."%' ".$HTTP_GET_VARS["sort"]);
+ $result=DBselect("select h.host,i.itemid,i.description,i.lastvalue,i.prevvalue,i.lastclock,i.status,h.hostid,i.value_type,i.units from items i,hosts h where h.hostid=i.hostid and h.status in (0,2) and i.status=0 and i.description like '%".$HTTP_GET_VARS["select"]."%' ".$HTTP_GET_VARS["sort"]);
}
else
{
- $result=DBselect("select h.host,i.itemid,i.description,i.lastvalue,i.prevvalue,i.lastclock,i.status,h.hostid,i.value_type from items i,hosts h where h.hostid=i.hostid and h.status in (0,2) and i.status=0 and h.hostid=".$HTTP_GET_VARS["hostid"]." ".$HTTP_GET_VARS["sort"]);
+ $result=DBselect("select h.host,i.itemid,i.description,i.lastvalue,i.prevvalue,i.lastclock,i.status,h.hostid,i.value_type,i.units from items i,hosts h where h.hostid=i.hostid and h.status in (0,2) and i.status=0 and h.hostid=".$HTTP_GET_VARS["hostid"]." ".$HTTP_GET_VARS["sort"]);
}
while($row=DBfetch($result))
{
@@ -275,7 +275,7 @@
{
if($row["value_type"] == 0 )
{
- echo "<td>"; printf("%.0f",$row["lastvalue"]); echo "</td>";
+ echo "<td>"; printf("%.0f %s",$row["lastvalue"],$row["units"]); echo "</td>";
}
else
{
@@ -284,7 +284,7 @@
}
else
{
- echo "<td>"; printf("%.2f",$row["lastvalue"]); echo "</td>";
+ echo "<td>"; printf("%.2f %s",$row["lastvalue"],$row["units"]); echo "</td>";
}
}
else