diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 10d58b43e3..1ae15bc64a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-09-11 Miguel de Dios + + * godmode/alerts/alert_list.php: fix bug in "Alerts ยป Manage alerts" when + you choose the agent the module select did'nt change to enable. + 2009-09-09 Sancho Lerena * operation/agentes/estado_monitores.php: Main view now also show last diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 77e7a8c756..74cc64b1f0 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -560,6 +560,39 @@ $(document).ready (function () { } ); + + $("#text-id_agent").result ( + function () { + selectAgent = true; + var agent_name = this.value; + $('#id_agent_module').fadeOut ('normal', function () { + $('#id_agent_module').empty (); + var inputs = []; + inputs.push ("agent_name=" + agent_name); + inputs.push ("get_agent_modules_json=1"); + inputs.push ("page=operation/agentes/ver_agente"); + jQuery.ajax ({ + data: inputs.join ("&"), + type: 'GET', + url: action="ajax.php", + timeout: 10000, + dataType: 'json', + success: function (data) { + $('#id_agent_module').append ($('').attr ('value', 0).text ("--")); + jQuery.each (data, function (i, val) { + s = html_entity_decode (val['nombre']); + $('#id_agent_module').append ($('').attr ('value', val['id_agente_modulo']).text (s)); + }); + $('#id_agent_module').enable(); + $('#id_agent_module').fadeIn ('normal'); + } + }); + }); + + + } + ); + //---------------------------- $("#text-agent_name").autocomplete ("ajax.php", {