diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 6cc4d1802e..7954ff4c72 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,30 @@ +2009-04-20 Esteban Sanchez + + * godmode/agentes/module_manager_editor.php, + godmode/agentes/module_manager_editor_common.php, + godmode/agentes/module_manager_editor_data.php, + godmode/agentes/module_manager_editor_network.php, + godmode/agentes/module_manager_editor_plugin.php, + godmode/agentes/module_manager_editor_prediction.php, + godmode/agentes/module_manager_editor_wmi.php, + godmode/agentes/module_manager.php: Some fixes to allow form + reutilization. + + * godmode/reporting/reporting_builder.php: Replaced exit with return. Use + pandoraSelectGroup() control. + + * godmode/agentes/modificar_agente.php: Style correction by using pandora + functions. + + * godmode/agentes/massive_operations.php: Fixed tab styles that was showing + wrong the . + + * godmode/agentes/manage_config_remote.php: Changes in + user_access_to_agent() + + * general/ui/agents_list.php: Added to repository. Reusable render for an + agent list. + 2009-04-20 Jorge Gonzalez * include/languages/es.po, include/languages/es.mo: Updated Spanish diff --git a/pandora_console/general/ui/agents_list.php b/pandora_console/general/ui/agents_list.php new file mode 100644 index 0000000000..63f6d1f94d --- /dev/null +++ b/pandora_console/general/ui/agents_list.php @@ -0,0 +1,217 @@ + $value) { + $value = safe_input ($value); + switch ($field) { + case 'page': + case 'search_agents': + case 'search': + case 'table_renders': + case 'fields': + case 'filter': + case 'access': + continue; + case 'search': + array_push ($filter, '(nombre LIKE "%%'.$value.'%%" OR descripcion LIKE "%%'.$value.'%%")'); + break; + case 'id_group': + if ($value == 1) + $filter['id_grupo'] = array_keys (get_user_groups (false, $value)); + else + $filter['id_grupo'] = $value; + break; + default: + $filter[$field] = $value; + } + } + + $agents = get_agents ($filter, $fields, $access); + $all_data = array (); + if ($agents !== false) { + foreach ($agents as $agent) { + $data = array (); + foreach ($table_renders as $name => $values) { + if (! is_numeric ($name)) { + array_push ($data, render_agent_field (&$agent, $name, $values, true)); + } else { + array_push ($data, render_agent_field (&$agent, $values, false, true)); + } + } + array_push ($all_data, $data); + } + } + + echo json_encode ($all_data); + return; + } + return; +} + +require_once ('include/functions_ui_renders.php'); + +check_login (); + +if ($show_filter_form) { + $table->width = '90%'; + $table->id = 'search_agent_table'; + $table->data = array (); + $table->size = array (); + $table->style = array (); + $table->style[0] = 'font-weight: bold'; + $table->style[2] = 'font-weight: bold'; + + $odd = true; + if ($group_filter) { + if ($odd) + $data = array (); + $data = array (); + $data[] = __('Group'); + $data[] = print_select (get_user_groups (false, $access), + 'id_group', '', '', '', '', true); + if (! $odd) + array_push ($table->data, $data); + $odd = !$odd; + } + + if ($text_filter) { + if ($odd) + $data = array (); + $data[] = __('Search'); + $data[] = print_input_text ('search', '', '', 15, 255, true); + if (! $odd) + array_push ($table->data, $data); + $odd = !$odd; + } + + echo ''; + + require_jquery_file ('form'); +} + +$table->width = '90%'; +$table->id = 'agents_table'; +$table->head = $table_heads; +$table->align = $table_align; +$table->size = $table_size; +$table->data = array (); + +$agents = get_agents ($filter, $fields, $access); + +echo ''; + +echo ''; +?> + diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 6d3bb92850..6bbee5bba7 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -182,6 +182,7 @@ if ($create_agent) { $img_style = array ("class" => "top", "width" => 16); if ($id_agente) { + echo '