summaryrefslogtreecommitdiffstats
path: root/frontends/php/discoveryconf.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/discoveryconf.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/discoveryconf.php')
-rw-r--r--frontends/php/discoveryconf.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/frontends/php/discoveryconf.php b/frontends/php/discoveryconf.php
index be9b9e95..df941d44 100644
--- a/frontends/php/discoveryconf.php
+++ b/frontends/php/discoveryconf.php
@@ -70,6 +70,8 @@ include_once "include/page_header.php";
);
check_fields($fields);
+ validate_sort_and_sortorder();
+
$_REQUEST['dchecks'] = get_request('dchecks', array());
?>
@@ -201,15 +203,18 @@ include_once "include/page_header.php";
$tblDiscovery = new CTableInfo(S_NO_DISCOVERY_RULES_DEFINED);
$tblDiscovery->SetHeader(array(
array( new CCheckBox('all_drules',null,"CheckAll('".$form->GetName()."','all_drules');"),
- S_NAME
+ make_sorting_link(S_NAME,'d.name')
),
- S_IP_RANGE,
- S_DELAY,
+ make_sorting_link(S_IP_RANGE,'d.iprange'),
+ make_sorting_link(S_DELAY,'d.delay'),
S_CHECKS,
S_STATUS));
- $db_rules = DBselect('select * from drules where '.DBin_node('druleid').
- ' order by name, druleid');
+ $db_rules = DBselect('SELECT d.* '.
+ ' FROM drules d'.
+ ' WHERE '.DBin_node('druleid').
+ order_by('d.name,d.iprange,d.delay','d.druleid'));
+
while($rule_data = DBfetch($db_rules))
{
$cheks = array();