summaryrefslogtreecommitdiffstats
path: root/frontends/php/triggers.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-06-03 21:04:18 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2002-06-03 21:04:18 +0000
commitca309d601413e7615cd322b235c41591e149dcb9 (patch)
tree62268cb37013566bd0a3b48ade94b1b3c18dc9ac /frontends/php/triggers.php
parent071a071414485ad4edb14e071ad141afadbfc9e9 (diff)
- added column alarms.value (Alexei)
- removed column alarms.istrue (Alexei) - added columns triggers.status (Alexei) - added columns triggers.value (Alexei) - removed column triggers.istrue (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@401 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/triggers.php')
-rw-r--r--frontends/php/triggers.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/frontends/php/triggers.php b/frontends/php/triggers.php
index 4574ed83..c322cf92 100644
--- a/frontends/php/triggers.php
+++ b/frontends/php/triggers.php
@@ -41,10 +41,10 @@
if(validate_expression($expression)==0)
{
$now=mktime();
- if(isset($disabled)) { $istrue=2; }
- else { $istrue=0; }
+ if(isset($disabled)) { $status=1; }
+ else { $status=0; }
- $result=update_trigger($triggerid,$expression,$description,$priority,$istrue,$comments,$url);
+ $result=update_trigger($triggerid,$expression,$description,$priority,$status,$comments,$url);
show_messages($result,"Trigger updated","Cannot update trigger");
}
else
@@ -57,10 +57,10 @@
{
if(validate_expression($expression)==0)
{
- if(isset($disabled)) { $istrue=2; }
- else { $istrue=3; }
+ if(isset($disabled)) { $status=1; }
+ else { $status=0; }
- $result=add_trigger($expression,$description,$priority,$istrue,$comments,$url);
+ $result=add_trigger($expression,$description,$priority,$status,$comments,$url);
show_messages($result,"Trigger added","Cannot add trigger");
}
else
@@ -110,7 +110,7 @@
if(isset($hostid)&&!isset($triggerid))
{
- $result=DBselect("select distinct h.hostid,h.host,t.triggerid,t.expression,t.description,t.istrue 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 h.hostid=$hostid order by h.host,t.description");
+ $result=DBselect("select distinct h.hostid,h.host,t.triggerid,t.expression,t.description,t.status,t.value 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 h.hostid=$hostid order by h.host,t.description");
$lasthost="";
$col=0;
while($row=DBfetch($result))
@@ -144,13 +144,13 @@
echo "<TD>".explode_exp($row["expression"],1)."</TD>";
echo "<TD>";
- if($row["istrue"] == 2)
+ if($row["status"] == 1)
{
- echo "<a href=\"triggers.php?register=changestatus&triggerid=".$row["triggerid"]."&status=3&hostid=".$row["hostid"]."\">Disabled</a>";
+ echo "<a href=\"triggers.php?register=changestatus&triggerid=".$row["triggerid"]."&status=0&hostid=".$row["hostid"]."\">Disabled</a>";
}
else
{
- echo "<a href=\"triggers.php?register=changestatus&triggerid=".$row["triggerid"]."&status=2&hostid=".$row["hostid"]."\">Enabled</a>";
+ echo "<a href=\"triggers.php?register=changestatus&triggerid=".$row["triggerid"]."&status=1&hostid=".$row["hostid"]."\">Enabled</a>";
}
$expression=rawurlencode($row["expression"]);
echo "</TD>";