From 929310d0e92b360d328c8193e3bb6faa4e055bc4 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 6 Oct 2020 17:33:34 +0200 Subject: [PATCH 1/2] fixed bad module id reference --- pandora_console/include/functions_modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index 81991face5..fef8c7d302 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -2359,7 +2359,7 @@ function modules_get_agentmodule_data_for_humans($module) } else { $salida = ui_print_module_string_value( $module['datos'], - $module['id_agente_modulo'], + $module['id'], $module['current_interval'], $module['module_name'] ); From f5648d734ddffa1e552a1e023161cd7dc17106a1 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Mon, 23 Nov 2020 17:09:58 +0100 Subject: [PATCH 2/2] fixed snapshot in meta --- pandora_console/include/class/Tree.class.php | 3 ++- pandora_console/include/functions_modules.php | 3 ++- pandora_console/include/functions_ui.php | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index a5f754866d..9d7dbd6555 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -565,7 +565,6 @@ class Tree $module['id_module_type'] = (int) $module['id_tipo_modulo']; $module['server_type'] = (int) $module['id_modulo']; $module['status'] = $module['estado']; - $module['value'] = modules_get_agentmodule_data_for_humans($module); if (is_metaconsole()) { $module['serverID'] = $this->serverID; @@ -575,6 +574,8 @@ class Tree $module['serverID'] = false; } + $module['value'] = modules_get_agentmodule_data_for_humans($module); + if (!isset($module['value'])) { $module['value'] = modules_get_last_value($module['id']); } diff --git a/pandora_console/include/functions_modules.php b/pandora_console/include/functions_modules.php index fef8c7d302..b694412ff6 100755 --- a/pandora_console/include/functions_modules.php +++ b/pandora_console/include/functions_modules.php @@ -2361,7 +2361,8 @@ function modules_get_agentmodule_data_for_humans($module) $module['datos'], $module['id'], $module['current_interval'], - $module['module_name'] + $module['module_name'], + $module['serverID'] ? $module['serverID'] : 0 ); } } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index ab6079fb36..cedec43a63 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -5609,7 +5609,8 @@ function ui_print_module_string_value( $value, $id_agente_module, $current_interval, - $module_name=null + $module_name=null, + $server_id=0 ) { global $config; @@ -5654,6 +5655,7 @@ function ui_print_module_string_value( 'last_data' => $value, 'interval' => $current_interval, 'module_name' => $module_name, + 'id_node' => $server_id ? $server_id : 0, ] ); $salida = ui_get_snapshot_image($link, $is_snapshot).'  '; @@ -5761,7 +5763,7 @@ function ui_get_snapshot_link($params, $only_params=false) $params = array_merge($default_params, $params); // First parameter of js winopeng_var. - $page = $config['homeurl'].'/operation/agentes/snapshot_view.php'; + $page = ui_get_full_url('operation/agentes/snapshot_view.php', false, false, false); $url = $page.'?id='.$params['id_module'].'&label='.rawurlencode(urlencode(io_safe_output($params['module_name']))).'&id_node='.$params['id_node'];