diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-04 10:30:02 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-04 10:30:02 +0000 |
commit | e155c74da360c3024cf27f9147ff93d2bcd10ec5 (patch) | |
tree | 7520a44add065b264cc2e33cb0585775552e615e /frontends/php/triggers.php | |
parent | af70b333dae2f31ed9defee6819f7801ad2e24f0 (diff) | |
download | zabbix-e155c74da360c3024cf27f9147ff93d2bcd10ec5.tar.gz zabbix-e155c74da360c3024cf27f9147ff93d2bcd10ec5.tar.xz zabbix-e155c74da360c3024cf27f9147ff93d2bcd10ec5.zip |
- fixed trigger dependencies for templated triggers (Eugene)
- mitor fixes
git-svn-id: svn://svn.zabbix.com/trunk@3973 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/triggers.php')
-rw-r--r-- | frontends/php/triggers.php | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/frontends/php/triggers.php b/frontends/php/triggers.php index 03553a61..0c6b1526 100644 --- a/frontends/php/triggers.php +++ b/frontends/php/triggers.php @@ -396,7 +396,7 @@ include_once "include/page_header.php"; $row["triggerid"]); /* value */ if($row["templateid"] > 0) $chkBox->SetEnabled(false); - $description = array($chkBox,SPACE); + $description = array('['.$row["triggerid"].']',$chkBox,SPACE); if($row["templateid"]) { @@ -404,37 +404,29 @@ include_once "include/page_header.php"; $real_host = DBfetch($real_hosts); if($real_host) { - array_push($description, - new CLink($real_host["host"], - "triggers.php?&hostid=".$real_host["hostid"], 'unknown'), - ":" - ); + $description[] = new CLink($real_host["host"], + "triggers.php?&hostid=".$real_host["hostid"], 'unknown'); } else { - array_push($description, - new CSpan("error","on"), - ":" - ); + $description[] = new CSpan("error","on"); } + $description[] = ':'; } - array_push($description, - new CLink(expand_trigger_description($row["triggerid"]), + + $description[] = new CLink(expand_trigger_description($row["triggerid"]), "triggers.php?form=update&triggerid=".$row["triggerid"]. - "&hostid=".$row["hostid"], 'action') - ); + "&hostid=".$row["hostid"], 'action'); //add dependences - $result1=DBselect("select t.triggerid,t.description from triggers t,trigger_depends d". - " where t.triggerid=d.triggerid_up and d.triggerid_down=".$row["triggerid"]); - if($row1=DBfetch($result1)) + $deps = get_trigger_dependences_by_triggerid($row["triggerid"]); + if(count($deps) > 0) { - array_push($description,BR.BR."<strong>".S_DEPENDS_ON."</strong>".SPACE.BR); - do - { - array_push($description,expand_trigger_description($row1["triggerid"]).BR); - } while($row1=DBfetch($result1)); - array_push($description,BR); + $description[] = BR.BR."<strong>".S_DEPENDS_ON."</strong>".SPACE.BR; + foreach($deps as $val) + $description[] = '['.$val.']'.expand_trigger_description($val).BR; + + $description[] = BR; } if($row["priority"]==0) $priority=S_NOT_CLASSIFIED; |