summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-01 09:44:42 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-01 09:44:42 +0000
commit9e81f66c7cac5715f17f60159dc1e16c3d8cd4a3 (patch)
treee974af1252bf9bc493503fb72d1b4681c423013c /frontends/php/include/classes
parent8c0061780ec40dec2b08c3c6e00840236a3445a0 (diff)
downloadzabbix-9e81f66c7cac5715f17f60159dc1e16c3d8cd4a3.tar.gz
zabbix-9e81f66c7cac5715f17f60159dc1e16c3d8cd4a3.tar.xz
zabbix-9e81f66c7cac5715f17f60159dc1e16c3d8cd4a3.zip
- [DEV-194] dependent triggers are not count in SoT (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5861 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes')
-rw-r--r--frontends/php/include/classes/ctriggerinfo.mod.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/frontends/php/include/classes/ctriggerinfo.mod.php b/frontends/php/include/classes/ctriggerinfo.mod.php
index ca71d9fe..adac98d9 100644
--- a/frontends/php/include/classes/ctriggerinfo.mod.php
+++ b/frontends/php/include/classes/ctriggerinfo.mod.php
@@ -19,15 +19,15 @@
**/
?>
<?php
- class CTriggersInfo extends CTable
- {
+ include_once('include/triggers.inc.php');
+
+ class CTriggersInfo extends CTable{
/*
var $style;
var $show_header;
var $nodeid;*/
- function CTriggersInfo($style = STYLE_HORISONTAL)
- {
+ function CTriggersInfo($style = STYLE_HORISONTAL){
$this->style = null;
parent::CTable(NULL,"triggers_info");
@@ -36,8 +36,7 @@
$this->nodeid = get_current_nodeid();
}
- function SetOrientation($value)
- {
+ function SetOrientation($value){
if($value != STYLE_HORISONTAL && $value != STYLE_VERTICAL)
return $this->error("Incorrect value for SetOrientation [$value]");
@@ -53,9 +52,12 @@
}
function BodyToString(){
- global $USER_DETAILS;
- $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_RES_IDS_ARRAY, $this->nodeid);
+ $available_triggers = get_accessible_triggers(PERM_READ_ONLY, PERM_RES_IDS_ARRAY, $this->nodeid);
+ foreach($available_triggers as $id => $triggerid){
+ if(trigger_dependent($triggerid)) unset($available_triggers[$id]);
+ }
+
$this->CleanItems();
$ok = $uncn = $info = $warn = $avg = $high = $dis = 0;
@@ -68,9 +70,10 @@
' AND h.status='.HOST_STATUS_MONITORED.
' AND t.triggerid=f.triggerid '.
' AND i.status='.ITEM_STATUS_ACTIVE.
- ' AND '.DBcondition('h.hostid',$available_hosts).
- ' GROUP BY priority,t.value');
+ ' AND '.DBcondition('t.triggerid',$available_triggers).
+ ' GROUP BY t.priority,t.value');
while($row=DBfetch($db_priority)){
+
switch($row["value"]){
case TRIGGER_VALUE_TRUE:
switch($row["priority"]){