summaryrefslogtreecommitdiffstats
path: root/frontends/php/overview.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-02-26 11:50:57 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-02-26 11:50:57 +0000
commit77b0f6eeccfb4e183664d8b1bb4023e8075d6290 (patch)
tree0b697c32aa5d937fec3294d8848e8b03e79251cd /frontends/php/overview.php
parentc4b9f414885a3c6e67b23d09b48c3e32c5fd9336 (diff)
downloadzabbix-77b0f6eeccfb4e183664d8b1bb4023e8075d6290.tar.gz
zabbix-77b0f6eeccfb4e183664d8b1bb4023e8075d6290.tar.xz
zabbix-77b0f6eeccfb4e183664d8b1bb4023e8075d6290.zip
Improvements for overview.php (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1675 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/overview.php')
-rw-r--r--frontends/php/overview.php24
1 files changed, 19 insertions, 5 deletions
diff --git a/frontends/php/overview.php b/frontends/php/overview.php
index 08240b2e..2ee37d8e 100644
--- a/frontends/php/overview.php
+++ b/frontends/php/overview.php
@@ -143,7 +143,7 @@
$rows=array(nbsp($row["description"]));
foreach($hosts as $hostid)
{
- $sql="select value_type,lastvalue,units from items where hostid=$hostid and description='".$row["description"]."'";
+ $sql="select itemid,value_type,lastvalue,units from items where hostid=$hostid and description='".$row["description"]."'";
$result2=DBselect($sql);
if(DBnum_rows($result2)==1)
{
@@ -151,10 +151,22 @@
if(!isset($row2["lastvalue"])) $value="-";
else
{
- if($row2["value_type"] == 0)
- $value=nbsp(convert_units($row2["lastvalue"],$row2["units"]));
+ $sql="select t.triggerid from triggers t, items i, functions f where i.hostid=$hostid and i.itemid=".$row2["itemid"]." and i.itemid=f.itemid and t.priority>1 and t.triggerid=f.triggerid and t.value=".TRIGGER_VALUE_TRUE;
+ $result3=DBselect($sql);
+ if(DBnum_rows($result3)>0)
+ {
+ if($row2["value_type"] == 0)
+ $value=array("value"=>nbsp(convert_units($row2["lastvalue"],$row2["units"])),"class"=>"high");
+ else
+ $value=array("value"=>nbsp(htmlspecialchars(substr($row2["lastvalue"],0,20)." ...")),"class"=>"high");
+ }
else
- $value=nbsp(htmlspecialchars(substr($row2["lastvalue"],0,20)." ..."));
+ {
+ if($row2["value_type"] == 0)
+ $value=nbsp(convert_units($row2["lastvalue"],$row2["units"]));
+ else
+ $value=nbsp(htmlspecialchars(substr($row2["lastvalue"],0,20)." ..."));
+ }
}
}
else
@@ -210,7 +222,7 @@
$rows=array(nbsp($row["description"]));
foreach($hosts as $hostid)
{
- $sql="select t.status,t.value from triggers t,functions f,items i where f.triggerid=t.triggerid and i.itemid=f.itemid and i.hostid=$hostid and t.description='".addslashes($row["description"])."'";
+ $sql="select t.status,t.value,t.lastchange from triggers t,functions f,items i where f.triggerid=t.triggerid and i.itemid=f.itemid and i.hostid=$hostid and t.description='".addslashes($row["description"])."'";
$result2=DBselect($sql);
if(DBnum_rows($result2)==1)
{
@@ -219,6 +231,8 @@
{
if($row2["value"] == TRIGGER_VALUE_FALSE)
$value=array("value"=>"&nbsp;","class"=>"normal");
+ else if($row2["value"] == TRIGGER_VALUE_UNKNOWN)
+ $value=array("value"=>"&nbsp;","class"=>"unknown_trigger");
else
$value=array("value"=>"&nbsp;","class"=>"high");
}