summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-06-21 18:41:45 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-06-21 18:41:45 +0000
commit7b8199f4bbc932f3d72c6c67e4205c8ef4aed704 (patch)
tree26e77b279bc27c922ac51ca644bec5f790912441 /frontends/php/include
parent043dbb70cbc557bbc5f70a74453e506546148963 (diff)
downloadzabbix-7b8199f4bbc932f3d72c6c67e4205c8ef4aed704.tar.gz
zabbix-7b8199f4bbc932f3d72c6c67e4205c8ef4aed704.tar.xz
zabbix-7b8199f4bbc932f3d72c6c67e4205c8ef4aed704.zip
- status of triggers changes if host/item status has been changed (Alexei)
- status of triggers is set correctly even if zabbix is restarted (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@412 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/config.inc.php36
1 files changed, 33 insertions, 3 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index bb48475d..d746b2ad 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -2961,7 +2961,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
show_table2_header_end();
}
-
+/*
function show_footer()
{
echo "<br>";
@@ -2982,6 +2982,33 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
echo "</body>";
}
+*/
+
+ function show_footer()
+ {
+ global $USER_DETAILS;
+
+ echo "<br>";
+ echo "<table border=0 cellpadding=1 cellspacing=0 width=\"100%\" align=center>";
+ echo "<tr>";
+ echo "<td bgcolor=\"#000000\">";
+ echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" width=\"100%\" bgcolor=\"#666666\">";
+ echo "<tr><td align=center width=\"90%\">";
+ echo "<font face=\"Arial,Helvetica\" size=1>";
+ echo "<a href=\"http://zabbix.sourceforge.net\">ZABBIX</a> Copyright 2000,2001,2002 by <a href=\"mailto:alex@gobbo.caves.lv\">Alexei Vladishev</a>";
+ echo "</font>";
+ echo "</td>";
+ echo "<td align=right>";
+ echo "<font size=-1>| Connected as ".$USER_DETAILS["alias"];
+ echo "</td>";
+ echo "</tr>";
+ echo "</table>";
+ echo "</td>";
+ echo "</tr>";
+ echo "</table>";
+
+ echo "</body>";
+ }
function get_stats()
{
@@ -3051,6 +3078,8 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
$sql="select clock,value from alarms where triggerid=$triggerid and clock>=$min and clock<=$max";
$result=DBselect($sql);
+// echo $sql,"<br>";
+
// -1,0,1
$state=-1;
$true_time=0;
@@ -3078,7 +3107,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
{
$true_time+=$diff;
}
- if($state == 3)
+ if($state == 2)
{
$unknown_time+=$diff;
}
@@ -3093,7 +3122,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
$true_time+=$diff;
$state=$value;
}
- else if($state==3)
+ else if($state==2)
{
$unknown_time+=$diff;
$state=$value;
@@ -3120,6 +3149,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
}
}
+// echo "$true_time $false_time $unknown_time";
$total_time=$true_time+$false_time+$unknown_time;
$ret["true_time"]=$true_time;