From 9e4b68c0d3e03f59f35ff772246b7ab78c0933fa Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Fri, 24 Feb 2023 13:43:10 +0100 Subject: [PATCH] Fixed treeview alerts button --- pandora_console/include/functions_treeview.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/functions_treeview.php b/pandora_console/include/functions_treeview.php index 3228667e6d..deccb2cc1f 100755 --- a/pandora_console/include/functions_treeview.php +++ b/pandora_console/include/functions_treeview.php @@ -461,13 +461,17 @@ function treeview_printAlertsTable($id_module, $server_data=[], $no_head=false) if ($user_access_node && check_acl($config['id_user'], $id_group, 'LW')) { // Actions table echo '
'; - echo ''; - html_print_submit_button(__('Go to alerts edition'), 'upd_button', false, ['icon' => 'alert']); - echo ''; + html_print_button( + __('Go to alerts edition'), + 'upd_button', + false, + 'window.location.assign("'.$console_url.'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=alert&search=1&module_name='.$module_name.'&id_agente='.$agent_id.$url_hash.'")', + ['icon' => 'alert'] + ); echo '
'; } - if (!empty($server_data) && is_metaconsole()) { + if (empty($server_data) === false && is_metaconsole() === true) { metaconsole_restore_db(); }