Resolved conflict - #2429

This commit is contained in:
tatiana.llorente@artica.es 2018-09-13 16:25:53 +02:00
parent d652a9c942
commit 22bb52759c
2 changed files with 33 additions and 73 deletions

View File

@ -833,7 +833,7 @@ ui_require_javascript_file('pandora_modules');
i++; i++;
} }
$('#command_preview').html(command+' '+parameters); $('#command_preview').html(_.escape(command) + ' ' + _.escape(parameters));
} }
function show_locked_dialog(id_plugin, plugin_name) { function show_locked_dialog(id_plugin, plugin_name) {

View File

@ -187,8 +187,6 @@ if ($alert_validate) {
enterprise_hook('open_meta_frame'); enterprise_hook('open_meta_frame');
if ($free_search != '') { if ($free_search != '') {
switch ($config["dbtype"]) {
case "mysql":
$whereAlertSimple = 'AND (' . $whereAlertSimple = 'AND (' .
'id_alert_template IN ( 'id_alert_template IN (
SELECT id SELECT id
@ -220,44 +218,6 @@ if ($free_search != '') {
FROM tagente FROM tagente
WHERE nombre LIKE "%' . $free_search . '%") OR alias LIKE "%' . $free_search . '%")' . 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;
}
} }
else { else {
$whereAlertSimple = ''; $whereAlertSimple = '';