From 13ba59c2cd500052245c6f0d738508191b940d1e Mon Sep 17 00:00:00 2001 From: jsatoh Date: Mon, 22 Aug 2011 05:42:55 +0000 Subject: [PATCH] 2011-08-22 Junichi Satoh * include/javascript/jquery.pandora.controls.js, godmode/groups/group_list.php, godmode/massive/massive_delete_agents.php, godmode/massive/massive_edit_agents.php, godmode/massive/massive_delete_modules.php, include/functions_modules.php: Added group recursion feature, it allows to search agents in child groups. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4797 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 ++++++++++ pandora_console/godmode/groups/group_list.php | 3 ++- .../godmode/massive/massive_delete_agents.php | 15 ++++++++++++-- .../massive/massive_delete_modules.php | 20 ++++++++++++++++--- .../godmode/massive/massive_edit_agents.php | 19 +++++++++++++++--- pandora_console/include/functions_modules.php | 4 ++-- .../javascript/jquery.pandora.controls.js | 8 ++++++-- 7 files changed, 66 insertions(+), 13 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4761f7a16f..3db8af0584 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2011-08-22 Junichi Satoh + + * include/javascript/jquery.pandora.controls.js, + godmode/groups/group_list.php, + godmode/massive/massive_delete_agents.php, + godmode/massive/massive_edit_agents.php, + godmode/massive/massive_delete_modules.php, + include/functions_modules.php: Added group recursion feature, + it allows to search agents in child groups. + 2011-08-22 SAncho Lerena * pandora_console.spec: Updated spec for being used in Suse build diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 705ff7f223..67366b229b 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -66,6 +66,7 @@ if (is_ajax ()) { $disabled = (int) get_parameter ('disabled', 0); $search = (string) get_parameter ('search', ''); $keycount = (int) get_parameter ('keycount', 0); + $recursion = (int) get_parameter ('recursion', 0); if (! check_acl ($config['id_user'], $id_group, "AR")) { db_pandora_audit("ACL Violation", @@ -81,7 +82,7 @@ if (is_ajax ()) { } $agents['keycount'] = $keycount; - $agents = $agents + agents_get_group_agents ($id_group, $filter, "none"); + $agents = $agents + agents_get_group_agents ($id_group, $filter, "none", false, $recursion); echo json_encode ($agents); return; } diff --git a/pandora_console/godmode/massive/massive_delete_agents.php b/pandora_console/godmode/massive/massive_delete_agents.php index 6181ca5bfb..e682ef2740 100644 --- a/pandora_console/godmode/massive/massive_delete_agents.php +++ b/pandora_console/godmode/massive/massive_delete_agents.php @@ -65,6 +65,7 @@ function process_manage_delete ($id_agents) { $id_group = (int) get_parameter ('id_group'); $id_agents = get_parameter ('id_agents'); +$recursion = get_parameter('recursion'); $delete = (bool) get_parameter_post ('delete'); @@ -91,12 +92,16 @@ $table->style[0] = 'font-weight: bold; vertical-align:top'; $table->style[2] = 'font-weight: bold'; $table->size = array (); $table->size[0] = '15%'; -$table->size[1] = '85%'; +$table->size[1] = '35%'; +$table->size[2] = '15%'; +$table->size[3] = '35%'; $table->data = array (); $table->data[0][0] = __('Group'); $table->data[0][1] = html_print_select_groups(false, "AR", true, 'id_group', $id_group, false, '', '', true); +$table->data[0][2] = __('Group recursion'); +$table->data[0][3] = html_print_checkbox ("recursion", 1, $recursion, true, false); $table->data[1][0] = __('Agents'); $table->data[1][0] .= '