diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-09-09 09:13:00 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-09-09 09:13:00 +0000 |
commit | 36b34d4bf1b167ab8638c8b8dd4678c7e126e18a (patch) | |
tree | 084e215432e55fd68d8e6ebd89d3990be18d9ad6 /frontends/php/tr_status.html | |
parent | bce463b114d46094f1e4a07a34fccb117d86cc17 (diff) | |
download | zabbix-36b34d4bf1b167ab8638c8b8dd4678c7e126e18a.tar.gz zabbix-36b34d4bf1b167ab8638c8b8dd4678c7e126e18a.tar.xz zabbix-36b34d4bf1b167ab8638c8b8dd4678c7e126e18a.zip |
- added table triger_depends
- calls to perror() were changed to syslog() where possible
- added status line to full screen version of form "Status of Triggers"
git-svn-id: svn://svn.zabbix.com/trunk@200 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/tr_status.html')
-rw-r--r-- | frontends/php/tr_status.html | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/frontends/php/tr_status.html b/frontends/php/tr_status.html index 47de7602..127d09d0 100644 --- a/frontends/php/tr_status.html +++ b/frontends/php/tr_status.html @@ -108,6 +108,42 @@ if(isset($fullscreen)) { show_table_header("<A HREF=\"tr_status.html?onlytrue=$onlytrue&noactions=$noactions&compact=$compact\">TRIGGERS $time</A>"); + + $cond=""; + if(isset($hostid)) + { + $cond=" and h.hostid=$hostid "; + } + if($onlytrue=='true') + { + $result=DBselect("select t.priority,count(*) from triggers t,hosts h,items i,functions f where t.istrue=1 and f.itemid=i.itemid and h.hostid=i.hostid and t.triggerid=f.triggerid and i.status in (0,2) $cond group by 1"); + } + else + { + $result=DBselect("select t.priority,count(*) from triggers t,hosts h,items i,functions f where f.itemid=i.itemid and h.hostid=i.hostid and t.triggerid=f.triggerid and i.status in (0,2) $cond group by 1"); + } + $p0=$p1=$p2=$p3=$p4=$p5=0; + for($i=0;$i<DBnum_rows($result);$i++) + { + $priority=DBget_field($result,$i,0); + $count=DBget_field($result,$i,1); + if($priority==0) $p0=$count; + if($priority==1) $p1=$count; + if($priority==2) $p2=$count; + if($priority==3) $p3=$count; + if($priority==4) $p4=$count; + if($priority==5) $p5=$count; + } + echo "\n<TABLE BORDER=0 COLS=6 WIDTH=\"100%\" BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=0>"; + echo "<TR ALIGN=CENTER>"; + echo "<TD><B>Not classified: $p0</B></TD>"; + echo "<TD><B>Just information: $p1</B></TD>"; + echo "<TD><B>Warning: $p2</B></TD>"; + echo "<TD BGCOLOR=#DDAAAA><B>Average: $p3</B></TD>"; + echo "<TD BGCOLOR=#FF8888><B>High: $p4</B></TD>"; + echo "<TD BGCOLOR=RED><B>Disaster: $p5</B></TD>"; + echo "</TR>"; + echo "</TABLE>"; } else { @@ -192,8 +228,6 @@ { echo "<TD ALIGN=CENTER><FONT COLOR=\"00AA00\">FALSE</FONT></TD>";} elseif($istrue==2) { echo "<TD ALIGN=CENTER><FONT COLOR=\"777777\">DISABLED</FONT></TD>"; } - elseif($istrue==3) - { echo "<TD ALIGN=CENTER><FONT COLOR=\"777777\">MODIFIED</FONT></TD>"; } else { echo "<TD ALIGN=CENTER><FONT COLOR=\"AA0000\">TRUE</FONT></TD>"; } |