summaryrefslogtreecommitdiffstats
path: root/frontends/php/tr_status.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-13 10:34:02 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-08-13 10:34:02 +0000
commitb28c7dff335c484f7b47a99751b9567e6ccf1188 (patch)
tree54d4f7443fcd2a304ce615a74ad820a6a35380ef /frontends/php/tr_status.php
parent48933ee8048f2c2c95147a836e5fe5d492f7b1e6 (diff)
downloadzabbix-b28c7dff335c484f7b47a99751b9567e6ccf1188.tar.gz
zabbix-b28c7dff335c484f7b47a99751b9567e6ccf1188.tar.xz
zabbix-b28c7dff335c484f7b47a99751b9567e6ccf1188.zip
- [DEV-137] fix in triggers status screens (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5904 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/tr_status.php')
-rw-r--r--frontends/php/tr_status.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/frontends/php/tr_status.php b/frontends/php/tr_status.php
index 3d9bb977..2e755b77 100644
--- a/frontends/php/tr_status.php
+++ b/frontends/php/tr_status.php
@@ -413,9 +413,9 @@ include_once "include/page_header.php";
$config['event_ack_enable']?S_ACKNOWLEDGED:NULL,
S_COMMENTS
));
-
+
$cond =($_REQUEST['hostid'] > 0)?' AND h.hostid='.$_REQUEST['hostid'].' ':'';
- $cond.=($_REQUEST['groupid']> 0)?' AND hg.groupid ='.$_REQUEST['groupid']:'';
+ $cond.=($_REQUEST['groupid']> 0)?' AND hg.hostid=h.hostid AND hg.groupid ='.$_REQUEST['groupid']:'';
switch($show_triggers){
case TRIGGERS_OPTION_ALL:
@@ -437,17 +437,16 @@ include_once "include/page_header.php";
$sql = 'SELECT DISTINCT t.triggerid,t.status,t.description, t.expression,t.priority, '.
' t.lastchange,t.comments,t.url,t.value,h.host,h.hostid,t.type '.
' FROM triggers t,hosts h,items i,functions f '.($_REQUEST['groupid']?', hosts_groups hg ':'').
- ' WHERE f.itemid=i.itemid '.
- ' AND h.hostid=i.hostid '.
- ' AND t.triggerid=f.triggerid '.
+ ' WHERE '.DBcondition('t.triggerid',$available_triggers).
' AND t.status='.TRIGGER_STATUS_ENABLED.
+ ' AND f.triggerid=t.triggerid '.
+ ' AND i.itemid=f.itemid '.
' AND i.status='.ITEM_STATUS_ACTIVE.
- ' AND '.DBcondition('t.triggerid',$available_triggers).
+ ' AND h.hostid=i.hostid '.
' AND h.status='.HOST_STATUS_MONITORED.' '.$cond.
order_by('h.host,h.hostid,t.description,t.priority,t.lastchange');
$result = DBselect($sql);
-
while($row=DBfetch($result)){
// Check for dependencies
if(trigger_dependent($row["triggerid"])) continue;