summaryrefslogtreecommitdiffstats
path: root/frontends/php/report5.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-02 09:30:29 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-02 09:30:29 +0000
commit467c2281b799cf57a72682097fbeb7caa7d1faae (patch)
treef75f1d11f6160086057ee45cd3abbc464bccf2ba /frontends/php/report5.php
parentd6c398a22edb09dffc3f7589635897c78b1fae62 (diff)
downloadzabbix-467c2281b799cf57a72682097fbeb7caa7d1faae.tar.gz
zabbix-467c2281b799cf57a72682097fbeb7caa7d1faae.tar.xz
zabbix-467c2281b799cf57a72682097fbeb7caa7d1faae.zip
- [DEV-62] added availability to select all hosts in "Availability report" (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4967 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/report5.php')
-rw-r--r--frontends/php/report5.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/frontends/php/report5.php b/frontends/php/report5.php
index dec045c5..24b9ee49 100644
--- a/frontends/php/report5.php
+++ b/frontends/php/report5.php
@@ -74,13 +74,19 @@ include_once "include/page_header.php";
$accessible_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY);
- $result=DBselect("select h.host, t.triggerid, t.description, t.description, t.priority, count(distinct e.eventid) as count ".
- " from hosts h, triggers t, functions f, items i, events e where ".
- " h.hostid = i.hostid and i.itemid = f.itemid and t.triggerid=f.triggerid and ".
- ' t.triggerid=e.objectid and e.object='.EVENT_OBJECT_TRIGGER.' and e.clock>'.(time()-$time_dif).
- ' and h.hostid in ('.$accessible_hosts.') and '.DBin_node('t.triggerid').
- " group by h.host,t.triggerid,t.description,t.expression,t.priority ".
- " order by count desc, h.host, t.description, t.triggerid", 100);
+ $result=DBselect('SELECT h.host, t.triggerid, t.description, t.expression, t.priority, count(distinct e.eventid) as count '.
+ ' FROM hosts h, triggers t, functions f, items i, events e'.
+ ' WHERE h.hostid = i.hostid '.
+ ' and i.itemid = f.itemid '.
+ ' and t.triggerid=f.triggerid '.
+ ' and t.triggerid=e.objectid '.
+ ' and e.object='.EVENT_OBJECT_TRIGGER.
+ ' and e.clock>'.(time()-$time_dif).
+ ' and h.hostid in ('.$accessible_hosts.') '.
+ ' and '.DBin_node('t.triggerid').
+ ' GROUP BY h.host,t.triggerid,t.description,t.expression,t.priority '.
+ ' ORDER BY count desc, h.host, t.description, t.triggerid'
+ , 100);
while($row=DBfetch($result))
{