diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-08 14:48:04 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-08 14:48:04 +0000 |
commit | 616715ae783f353d07b1cfa1f48a7631c165a2f8 (patch) | |
tree | fc116283f045e60c3fa4d4c62c0e10dc6bdf457c /frontends/php/report5.php | |
parent | 0218e165825ef10e034b1784777c1d53cf789104 (diff) | |
download | zabbix-616715ae783f353d07b1cfa1f48a7631c165a2f8.tar.gz zabbix-616715ae783f353d07b1cfa1f48a7631c165a2f8.tar.xz zabbix-616715ae783f353d07b1cfa1f48a7631c165a2f8.zip |
- [DEV-144] added mass-update for triggers (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5819 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/report5.php')
-rw-r--r-- | frontends/php/report5.php | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/frontends/php/report5.php b/frontends/php/report5.php index 24b9ee49..e21a1c81 100644 --- a/frontends/php/report5.php +++ b/frontends/php/report5.php @@ -63,8 +63,7 @@ include_once "include/page_header.php"; S_NUMBER_OF_STATUS_CHANGES )); - switch($_REQUEST["period"]) - { + switch($_REQUEST["period"]){ case "week": $time_dif=7*24*3600; break; case "month": $time_dif=10*24*3600; break; case "year": $time_dif=365*24*3600; break; @@ -73,8 +72,7 @@ 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.expression, t.priority, count(distinct e.eventid) as count '. + $sql = 'SELECT h.host, t.triggerid, t.description, t.expression, t.priority, count(distinct e.eventid) as cnt_event '. ' FROM hosts h, triggers t, functions f, items i, events e'. ' WHERE h.hostid = i.hostid '. ' and i.itemid = f.itemid '. @@ -85,20 +83,20 @@ include_once "include/page_header.php"; ' 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); + ' ORDER BY cnt_event desc, h.host, t.description, t.triggerid'; + + $result=DBselect($sql, 100); - while($row=DBfetch($result)) - { - if(!check_right_on_trigger_by_triggerid(null, $row['triggerid'], $accessible_hosts)) - continue; + while($row=DBfetch($result)){ + if(!check_right_on_trigger_by_triggerid(null, $row['triggerid'], $accessible_hosts)) + continue; - $table->addRow(array( - get_node_name_by_elid($row['triggerid']), - $row["host"], - expand_trigger_description_by_data($row), - new CCol(get_severity_description($row["priority"]),get_severity_style($row["priority"])), - $row["count"], + $table->addRow(array( + get_node_name_by_elid($row['triggerid']), + $row["host"], + expand_trigger_description_by_data($row), + new CCol(get_severity_description($row["priority"]),get_severity_style($row["priority"])), + $row["cnt_event"], )); } $table->show(); |