diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 49310a1dff..bd70645707 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,34 @@ +2009-03-23 Esteban Sanchez + + * godmode/agentes/massive_edit_modules.php: The module selection is + now done using cascade selects instead of having a confusing tree on + the select. + + * godmode/alerts/alert_list.php: Fixed a bug when getting the latest + module value. + + * godmode/alerts/alert_templates.php: Fixed an error that didn't allow + deletion on some cases. Added an option to duplicate a template + easily. + + * godmode/alerts/configure_alert_template.php: Added template + duplication support. Fixed a mismatch on field1, field2 and field3 + which required to have a default action to be updated. This values are + not loaded anymore from default action. + + * godmode/db/db_purge.php: Many styles correction. Use pandora + functions for the bottom table. + + * include/functions_alerts.php: Added duplicate_alert_template(). + + * include/functions_db.php: Added a parameter to get_agent_modules() + to enable or disable the return of indexed values. + + * operation/agentes/sla_view.php: Style correction. + + * operation/agentes/ver_agente.php: Added support for indexed flag on + get_agent_modules_json AJAX operation. + 2009-03-20 Evi Vanoost * include/functions_incidents.php: Style change diff --git a/pandora_console/godmode/agentes/massive_edit_modules.php b/pandora_console/godmode/agentes/massive_edit_modules.php index 4f9b339c05..e097a563f8 100644 --- a/pandora_console/godmode/agentes/massive_edit_modules.php +++ b/pandora_console/godmode/agentes/massive_edit_modules.php @@ -47,7 +47,6 @@ function process_manage_edit ($module_name) { $values[$field] = $value; } - $modules = get_db_all_rows_filter ('tagente_modulo', array ('id_agente' => $agents, 'nombre' => $module_name), @@ -66,6 +65,7 @@ function process_manage_edit ($module_name) { process_sql ('SET AUTOCOMMIT = 1'); } +$module_type = (int) get_parameter ('module_type'); $module_name = (string) get_parameter ('module_name'); $update = (bool) get_parameter_post ('update'); @@ -74,7 +74,6 @@ if ($update) { process_manage_edit ($module_name); } - $table->id = 'delete_table'; $table->width = '95%'; $table->data = array (); @@ -82,45 +81,52 @@ $table->style = array (); $table->style[0] = 'font-weight: bold; vertical-align:top'; $table->style[2] = 'font-weight: bold'; $table->rowstyle = array (); -$table->rowstyle['edit1'] = 'display: none'; -$table->rowstyle['edit2'] = 'display: none'; $table->size = array (); $table->size[0] = '15%'; -$table->size[1] = '85%'; /* Fixed using javascript */ +$table->size[1] = '35%'; /* Fixed using javascript */ $table->size[2] = '15%'; $table->size[3] = '35%'; -$table->colspan = array (); -$table->colspan[0][1] = '3'; - +if (! $module_type) { + $table->rowstyle['edit1'] = 'display: none'; + $table->rowstyle['edit2'] = 'display: none'; +} $agents = get_group_agents (array_keys (get_user_groups ()), false, "none"); -$all_modules = get_db_all_rows_filter ('tagente_modulo', - array ('id_agente' => array_keys ($agents), - 'group' => 'nombre', - 'order' => 'id_tipo_modulo,nombre'), - array ('DISTINCT(nombre)', 'id_tipo_modulo')); +$module_types = get_db_all_rows_filter ('tagente_modulo,ttipo_modulo', + array ('tagente_modulo.id_tipo_modulo = ttipo_modulo.id_tipo', + 'id_agente' => array_keys ($agents), + 'disabled' => 0, + 'order' => 'ttipo_modulo.nombre'), + array ('DISTINCT(id_tipo)', + 'CONCAT(ttipo_modulo.descripcion," (",ttipo_modulo.nombre,")") AS description')); -if ($all_modules === false) - $all_modules = array (); +if ($module_types === false) + $module_types = array (); -$modules = array (); -$latest_type = -1; -$i = -1; -$prefix = str_repeat (' ', 3); -foreach ($all_modules as $module) { - if ($latest_type != $module['id_tipo_modulo']) { - $modules[$i--] = get_moduletype_description ($module['id_tipo_modulo']); - $latest_type = $module['id_tipo_modulo']; - } - $modules[$module['nombre']] = $prefix.$module['nombre']; +$types = ''; +foreach ($module_types as $type) { + $types[$type['id_tipo']] = $type['description']; } $table->data = array (); -$table->data[0][0] = __('Module'); -$table->data[0][0] .= '