summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/triggers.inc.php
diff options
context:
space:
mode:
authoralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-01 17:04:37 +0000
committeralex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-03-01 17:04:37 +0000
commit0f8b7ad12c3c8c4644671072a0ff9acfdebbcd35 (patch)
treeab9fb91f616d185a9b8d102d153ced00f6e4ec63 /frontends/php/include/triggers.inc.php
parent7d79fcd9d326e2580cb3148a71f1cdfad565c93f (diff)
downloadzabbix-0f8b7ad12c3c8c4644671072a0ff9acfdebbcd35.tar.gz
zabbix-0f8b7ad12c3c8c4644671072a0ff9acfdebbcd35.tar.xz
zabbix-0f8b7ad12c3c8c4644671072a0ff9acfdebbcd35.zip
- support of hysteresis (Alexei)
- support of macro {TRIGGER.VALUE} in trigger expressions (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@3857 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/triggers.inc.php')
-rw-r--r--frontends/php/include/triggers.inc.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php
index 14ba987a..fffc4573 100644
--- a/frontends/php/include/triggers.inc.php
+++ b/frontends/php/include/triggers.inc.php
@@ -459,7 +459,11 @@
if($expression[$i] == '}')
{
$state='';
- if($function_data = DBfetch(DBselect('select h.host,i.key_,f.function,f.parameter,i.itemid,i.value_type'.
+ if($functionid=="TRIGGER.VALUE")
+ {
+ $exp .= "{".$functionid."}";
+ }
+ else if($function_data = DBfetch(DBselect('select h.host,i.key_,f.function,f.parameter,i.itemid,i.value_type'.
' from items i,functions f,hosts h'.
' where functionid='.$functionid.' and i.itemid=f.itemid and h.hostid=i.hostid')))
{
@@ -518,6 +522,13 @@
continue;
}
}
+// Processing of macros {TRIGGER.VALUE}
+ if( ($expression[$i] == '}')&&($state=="HOST") )
+ {
+ $exp = $exp."{".$host."}";
+ $state="";
+ continue;
+ }
if( ($expression[$i] == '}')&&($state=="") )
{
// echo "HOST:$host<BR>";