From 22bb52759ca8f3d0d2e32fb00bfd116ddc097018 Mon Sep 17 00:00:00 2001 From: "tatiana.llorente@artica.es" Date: Thu, 13 Sep 2018 16:25:53 +0200 Subject: [PATCH] Resolved conflict - #2429 --- pandora_console/godmode/servers/plugin.php | 2 +- .../operation/agentes/alerts_status.php | 104 ++++++------------ 2 files changed, 33 insertions(+), 73 deletions(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index f8ca3084ea..1440c13344 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -833,7 +833,7 @@ ui_require_javascript_file('pandora_modules'); i++; } - $('#command_preview').html(command+' '+parameters); + $('#command_preview').html(_.escape(command) + ' ' + _.escape(parameters)); } function show_locked_dialog(id_plugin, plugin_name) { diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index c3e5d5ba4e..47b1a97318 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -187,77 +187,37 @@ if ($alert_validate) { enterprise_hook('open_meta_frame'); if ($free_search != '') { - switch ($config["dbtype"]) { - case "mysql": - $whereAlertSimple = 'AND (' . - 'id_alert_template IN ( - SELECT id - FROM talert_templates - WHERE name LIKE "%' . $free_search . '%") OR ' . - 'id_alert_template IN ( - SELECT id - FROM talert_templates - WHERE id_alert_action IN ( - SELECT id - FROM talert_actions - WHERE name LIKE "%' . $free_search . '%")) OR ' . - 'talert_template_modules.id IN ( - SELECT id_alert_template_module - FROM talert_template_module_actions - WHERE id_alert_action IN ( - SELECT id - FROM talert_actions - WHERE name LIKE "%' . $free_search . '%")) OR ' . - 'id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE nombre LIKE "%' . $free_search . '%") OR ' . - 'id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE id_agente IN ( - SELECT id_agente - FROM tagente - WHERE nombre LIKE "%' . $free_search . '%") OR alias LIKE "%' . $free_search . '%")' . - ')'; - - break; - case "postgresql": - case "oracle": - $whereAlertSimple = 'AND (' . - 'id_alert_template IN ( - SELECT id - FROM talert_templates - WHERE name LIKE \'%' . $free_search . '%\') OR ' . - 'id_alert_template IN ( - SELECT id - FROM talert_templates - WHERE id_alert_action IN ( - SELECT id - FROM talert_actions - WHERE name LIKE \'%' . $free_search . '%\')) OR ' . - 'talert_template_modules.id IN ( - SELECT id_alert_template_module - FROM talert_template_module_actions - WHERE id_alert_action IN ( - SELECT id - FROM talert_actions - WHERE name LIKE \'%' . $free_search . '%\')) OR ' . - 'id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE nombre LIKE \'%' . $free_search . '%\') OR ' . - 'id_agent_module IN ( - SELECT id_agente_modulo - FROM tagente_modulo - WHERE id_agente IN ( - SELECT id_agente - FROM tagente - WHERE nombre LIKE \'%' . $free_search . '%\' OR alias LIKE \'%' . $free_search . '%\'))' . - ')'; - - break; - } + $whereAlertSimple = 'AND (' . + 'id_alert_template IN ( + SELECT id + FROM talert_templates + WHERE name LIKE "%' . $free_search . '%") OR ' . + 'id_alert_template IN ( + SELECT id + FROM talert_templates + WHERE id_alert_action IN ( + SELECT id + FROM talert_actions + WHERE name LIKE "%' . $free_search . '%")) OR ' . + 'talert_template_modules.id IN ( + SELECT id_alert_template_module + FROM talert_template_module_actions + WHERE id_alert_action IN ( + SELECT id + FROM talert_actions + WHERE name LIKE "%' . $free_search . '%")) OR ' . + 'id_agent_module IN ( + SELECT id_agente_modulo + FROM tagente_modulo + WHERE nombre LIKE "%' . $free_search . '%") OR ' . + 'id_agent_module IN ( + SELECT id_agente_modulo + FROM tagente_modulo + WHERE id_agente IN ( + SELECT id_agente + FROM tagente + WHERE nombre LIKE "%' . $free_search . '%") OR alias LIKE "%' . $free_search . '%")' . + ')'; } else { $whereAlertSimple = ''; @@ -705,4 +665,4 @@ ui_require_jquery_file('cluetip'); } }).change(); - + \ No newline at end of file