From 6b14754137018926074d7c846d9c3f47109145cc Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 1 Oct 2018 15:30:43 +0200 Subject: [PATCH 1/3] fixed conflict --- pandora_console/include/functions_ui.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 4d07f2d9fc..3b85aff5f7 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -823,6 +823,26 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f else return array ("", "", "", "", "", "", ""); } + + + if (defined('METACONSOLE')) { + + $server = db_get_row ('tmetaconsole_setup', 'id', $alert['server_data']['id']); + + if (metaconsole_connect($server) == NOERR) { + + // Get agent data from node + $agente = db_get_row ('tagente', 'id_agente', $alert['id_agent']); + + metaconsole_restore_db (); + } + + } else { + // Get agent id + $id_agent = modules_get_agentmodule_agent ($alert['id_agent_module']); + $agente = db_get_row ('tagente', 'id_agente', $id_agent); + } + $template = alerts_get_alert_template ($alert['id_alert_template']); $description = io_safe_output($template['name']); From 1d726d59f3876c8e70da369788ad03f0c345f0e8 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 1 Oct 2018 15:34:36 +0200 Subject: [PATCH 2/3] fixed conflict --- pandora_console/include/functions_ui.php | 1 - 1 file changed, 1 deletion(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 3b85aff5f7..08345e8300 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -824,7 +824,6 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f return array ("", "", "", "", "", "", ""); } - if (defined('METACONSOLE')) { $server = db_get_row ('tmetaconsole_setup', 'id', $alert['server_data']['id']); From 1c2743797efe76f162920c548e4ecb3a8441eeca Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 1 Oct 2018 18:16:55 +0200 Subject: [PATCH 3/3] Revert "fixed conflict" This reverts commit 1d726d59f3876c8e70da369788ad03f0c345f0e8. --- pandora_console/include/functions_ui.php | 1 + 1 file changed, 1 insertion(+) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 08345e8300..3b85aff5f7 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -824,6 +824,7 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f return array ("", "", "", "", "", "", ""); } + if (defined('METACONSOLE')) { $server = db_get_row ('tmetaconsole_setup', 'id', $alert['server_data']['id']);