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++;
}
$('#command_preview').html(command+' '+parameters);
$('#command_preview').html(_.escape(command) + ' ' + _.escape(parameters));
}
function show_locked_dialog(id_plugin, plugin_name) {

View File

@ -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();
</script>
</script>