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,77 +187,37 @@ if ($alert_validate) {
enterprise_hook('open_meta_frame'); enterprise_hook('open_meta_frame');
if ($free_search != '') { if ($free_search != '') {
switch ($config["dbtype"]) { $whereAlertSimple = 'AND (' .
case "mysql": 'id_alert_template IN (
$whereAlertSimple = 'AND (' . SELECT id
'id_alert_template IN ( FROM talert_templates
SELECT id WHERE name LIKE "%' . $free_search . '%") OR ' .
FROM talert_templates 'id_alert_template IN (
WHERE name LIKE "%' . $free_search . '%") OR ' . SELECT id
'id_alert_template IN ( FROM talert_templates
SELECT id WHERE id_alert_action IN (
FROM talert_templates SELECT id
WHERE id_alert_action IN ( FROM talert_actions
SELECT id WHERE name LIKE "%' . $free_search . '%")) OR ' .
FROM talert_actions 'talert_template_modules.id IN (
WHERE name LIKE "%' . $free_search . '%")) OR ' . SELECT id_alert_template_module
'talert_template_modules.id IN ( FROM talert_template_module_actions
SELECT id_alert_template_module WHERE id_alert_action IN (
FROM talert_template_module_actions SELECT id
WHERE id_alert_action IN ( FROM talert_actions
SELECT id WHERE name LIKE "%' . $free_search . '%")) OR ' .
FROM talert_actions 'id_agent_module IN (
WHERE name LIKE "%' . $free_search . '%")) OR ' . SELECT id_agente_modulo
'id_agent_module IN ( FROM tagente_modulo
SELECT id_agente_modulo WHERE nombre LIKE "%' . $free_search . '%") OR ' .
FROM tagente_modulo 'id_agent_module IN (
WHERE nombre LIKE "%' . $free_search . '%") OR ' . SELECT id_agente_modulo
'id_agent_module IN ( FROM tagente_modulo
SELECT id_agente_modulo WHERE id_agente IN (
FROM tagente_modulo SELECT id_agente
WHERE id_agente IN ( FROM tagente
SELECT id_agente WHERE nombre LIKE "%' . $free_search . '%") OR alias LIKE "%' . $free_search . '%")' .
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;
}
} }
else { else {
$whereAlertSimple = ''; $whereAlertSimple = '';
@ -705,4 +665,4 @@ ui_require_jquery_file('cluetip');
} }
}).change(); }).change();
</script> </script>