diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a38265589f..3b203897fb 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,15 @@ +2014-03-24 Miguel de Dios + + * godmode/massive/massive_edit_modules.php, + godmode/massive/massive_edit_agents.php, + godmode/massive/massive_delete_modules.php, + godmode/massive/massive_copy_modules.php, + godmode/groups/group_list.php, operation/agentes/ver_agente.php: + implement the filter by agent status in the other massive + operations. + + Incident: #669 + 2014-03-24 Alejandro Gallardo * operation/agentes/estado_monitores.php: Fixed an error diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 06fd68c6b0..5be3b50d69 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -94,7 +94,8 @@ if (is_ajax ()) { $filter['status'] = $status_agents; } - $agents = agents_get_group_agents($id_group, $filter, "none", false, $recursion); + $agents = agents_get_group_agents($id_group, $filter, "none", + false, $recursion); // Add keys prefix if ($keys_prefix !== "") { diff --git a/pandora_console/godmode/massive/massive_copy_modules.php b/pandora_console/godmode/massive/massive_copy_modules.php index 5c9e3ebce7..ef69476dac 100644 --- a/pandora_console/godmode/massive/massive_copy_modules.php +++ b/pandora_console/godmode/massive/massive_copy_modules.php @@ -61,13 +61,8 @@ $table->data = array (); $table->style = array (); $table->style[0] = 'font-weight: bold; vertical-align:top'; $table->style[2] = 'font-weight: bold'; -$table->size = array (); -$table->size[0] = '10%'; -$table->size[1] = '30%'; -$table->size[2] = '10%'; -$table->size[3] = '10%'; -$table->size[4] = '10%'; -$table->size[5] = '30%'; +$table->style[4] = 'font-weight: bold'; +$table->style[6] = 'font-weight: bold'; /* Source selection */ $table->id = 'source_table'; @@ -76,11 +71,21 @@ $table->data[0][1] = html_print_select_groups(false, "AR", true, 'source_id_grou false, '', '', true); $table->data[0][2] = __('Group recursion'); $table->data[0][3] = html_print_checkbox ("source_recursion", 1, $source_recursion, true, false); -$table->data[0][4] = __('Agent'); -$table->data[0][4] .= ' '; -$table->data[0][5] = html_print_select (agents_get_group_agents ($source_id_group, false, "none"), +$status_list = array (); +$status_list[AGENT_STATUS_NORMAL] = __('Normal'); +$status_list[AGENT_STATUS_WARNING] = __('Warning'); +$status_list[AGENT_STATUS_CRITICAL] = __('Critical'); +$status_list[AGENT_STATUS_UNKNOWN] = __('Unknown'); +$status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal'); +$status_list[AGENT_STATUS_NOT_INIT] = __('Not init'); +$table->data[0][4] = __('Status'); +$table->data[0][5] = html_print_select($status_list, + 'status_agents_source', 'selected', '', __('All'), AGENT_STATUS_ALL, true); +$table->data[0][6] = __('Agent'); +$table->data[0][6] .= ' '; +$table->data[0][7] = html_print_select (agents_get_group_agents ($source_id_group, false, "none"), 'source_id_agent', $source_id_agent, false, __('Select'), 0, true); echo '
'; @@ -149,6 +154,8 @@ echo ''.__('Targets').''; html_print_table ($table); echo ''; + + /* Destiny selection */ $table->id = 'destiny_table'; $table->data = array (); @@ -157,28 +164,42 @@ $table->size[1] = '30%'; $table->size[2] = '20%'; $table->size[3] = '30%'; $table->data[0][0] = __('Group'); -$table->data[0][1] = html_print_select ($groups, 'destiny_id_group', $destiny_id_group, - false, '', '', true); +$table->data[0][1] = html_print_select ($groups, 'destiny_id_group', + $destiny_id_group, false, '', '', true); $table->data[0][2] = __('Group recursion'); -$table->data[0][3] = html_print_checkbox ("destiny_recursion", 1, $destiny_recursion, true, false); -$table->data[1][0] = __('Agent'); -$table->data[1][0] .= ''; -$table->data[1][1] = html_print_select (agents_get_group_agents ($destiny_id_group, false, "none"), +$table->data[0][3] = html_print_checkbox ("destiny_recursion", 1, + $destiny_recursion, true, false); +$status_list = array (); +$status_list[AGENT_STATUS_NORMAL] = __('Normal'); +$status_list[AGENT_STATUS_WARNING] = __('Warning'); +$status_list[AGENT_STATUS_CRITICAL] = __('Critical'); +$status_list[AGENT_STATUS_UNKNOWN] = __('Unknown'); +$status_list[AGENT_STATUS_NOT_NORMAL] = __('Not normal'); +$status_list[AGENT_STATUS_NOT_INIT] = __('Not init'); +$table->data[1][0] = __('Status'); +$table->data[1][1] = html_print_select($status_list, + 'status_agents_destiny', 'selected', '', __('All'), AGENT_STATUS_ALL, true); +$table->data[2][0] = __('Agent'); +$table->data[2][0] .= ''; +$table->data[2][1] = html_print_select (agents_get_group_agents ($destiny_id_group, false, "none"), 'destiny_id_agent[]', 0, false, '', '', true, true); -echo '