summaryrefslogtreecommitdiffstats
path: root/frontends/php/nodes.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-12 10:20:29 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-12 10:20:29 +0000
commitc0c1b50df1ec73e0cd6b72c7cc10197e6cc44a0a (patch)
tree43b9a3f70cc15cfcc674fafbd0c8a3829417331e /frontends/php/nodes.php
parentd7d135227396a5b3cede974e94c25032a1bc69d2 (diff)
downloadzabbix-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/nodes.php')
-rw-r--r--frontends/php/nodes.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/frontends/php/nodes.php b/frontends/php/nodes.php
index b98fa768..abf71c60 100644
--- a/frontends/php/nodes.php
+++ b/frontends/php/nodes.php
@@ -55,6 +55,7 @@ include_once "include/page_header.php";
);
check_fields($fields);
+ validate_sort_and_sortorder();
$accessible_nodes = get_accessible_nodes_by_user($USER_DETAILS,PERM_READ_LIST,null,PERM_RES_IDS_ARRAY, get_current_nodeid(true));
@@ -118,12 +119,18 @@ include_once "include/page_header.php";
show_table_header(S_NODES_BIG,$form);
$table=new CTableInfo(S_NO_NODES_DEFINED);
- $table->SetHeader(array(S_ID,S_NAME,S_TYPE,S_TIME_ZONE,S_IP.':'.S_PORT));
+ $table->SetHeader(array(
+ make_sorting_link(S_ID,'n.nodeid'),
+ make_sorting_link(S_NAME,'n.name'),
+ make_sorting_link(S_TYPE,'n.nodetype'),
+ make_sorting_link(S_TIME_ZONE,'n.timezone'),
+ make_sorting_link(S_IP.':'.S_PORT,'n.ip')
+ ));
- $db_nodes = DBselect(
- 'select * from nodes '.
- ' where nodeid in ('.$accessible_nodes.') '.
- ' order by nodetype desc, masterid, name '
+ $db_nodes = DBselect('SELECT n.* '.
+ ' FROM nodes n'.
+ ' WHERE n.nodeid in ('.$accessible_nodes.') '.
+ order_by('n.nodeid,n.name,n.nodetype,n.timezone,n.ip','n.masterid')
);
while($row=DBfetch($db_nodes))
{