diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-11-12 10:20:29 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-11-12 10:20:29 +0000 |
| commit | c0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a (patch) | |
| tree | 43b9a3f70cc15cfcc674fafbd0c8a3829417331e /frontends/php/include/events.inc.php | |
| parent | d7d135227396a5b3cede974e94c25032a1bc69d2 (diff) | |
| download | zabbix-c0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a.tar.gz zabbix-c0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a.tar.xz zabbix-c0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a.zip | |
- [DEV-66] added sorting to screens (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4996 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/events.inc.php')
| -rw-r--r-- | frontends/php/include/events.inc.php | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/frontends/php/include/events.inc.php b/frontends/php/include/events.inc.php index 459b58e0..2e1f1c3b 100644 --- a/frontends/php/include/events.inc.php +++ b/frontends/php/include/events.inc.php @@ -51,24 +51,27 @@ $sql_cond.= ' AND e.value<>2 '; } - $result = DBselect('SELECT DISTINCT t.triggerid,t.priority,t.description,t.expression,h.host,e.clock,e.value '. + + + $table = new CTableInfo(S_NO_EVENTS_FOUND); + $table->SetHeader(array( + make_sorting_link(S_TIME,'e.clock'), + is_show_subnodes() ? make_sorting_link(S_NODE,'h.hostid') : null, + $hostid == 0 ? make_sorting_link(S_HOST,'h.host') : null, + make_sorting_link(S_DESCRIPTION,'t.description'), + make_sorting_link(S_VALUE,'e.value'), + make_sorting_link(S_SEVERITY,'t.priority') + )); + + $result = DBselect('SELECT DISTINCT t.triggerid,t.priority,t.description,t.expression,h.host,h.hostid,e.clock,e.value '. ' FROM events e, triggers t, functions f, items i, hosts h '.$sql_from. ' WHERE '.DBin_node('t.triggerid'). ' AND e.objectid=t.triggerid and e.object='.EVENT_OBJECT_TRIGGER. ' AND t.triggerid=f.triggerid and f.itemid=i.itemid '. ' AND i.hostid=h.hostid '.$sql_cond.' and h.status='.HOST_STATUS_MONITORED. - ' ORDER BY e.clock DESC,h.host,t.priority,t.description,t.triggerid ',10*($start+$num) + order_by('e.clock,h.host,h.hostid,t.priority,t.description,e.value','t.triggerid') + ,10*($start+$num) ); - - $table = new CTableInfo(S_NO_EVENTS_FOUND); - $table->SetHeader(array( - S_TIME, - is_show_subnodes() ? S_NODE : null, - $hostid == 0 ? S_HOST : null, - S_DESCRIPTION, - S_VALUE, - S_SEVERITY - )); $accessible_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY); |
