From b9242b17d8a8648023443ed2327355d59dc54e90 Mon Sep 17 00:00:00 2001 From: "alejandro.campos@artica.es" Date: Wed, 23 Nov 2022 16:29:27 +0100 Subject: [PATCH] fixed bugs in meta profiles management --- pandora_console/godmode/groups/group_list.php | 2 +- pandora_console/godmode/users/configure_user.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pandora_console/godmode/groups/group_list.php b/pandora_console/godmode/groups/group_list.php index 990b0bac77..7856f68665 100644 --- a/pandora_console/godmode/groups/group_list.php +++ b/pandora_console/godmode/groups/group_list.php @@ -42,7 +42,6 @@ require_once $config['homedir'].'/include/functions_users.php'; if (is_metaconsole() === true) { enterprise_include_once('include/functions_metaconsole.php'); enterprise_include_once('meta/include/functions_agents_meta.php'); - enterprise_hook('open_meta_frame'); } if (is_ajax() === true) { @@ -270,6 +269,7 @@ if (is_ajax() === true) { return; } +enterprise_hook('open_meta_frame'); $tab = (string) get_parameter('tab', 'groups'); diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 677161411a..e81997fa4a 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -35,8 +35,6 @@ require_once $config['homedir'].'/vendor/autoload.php'; use PandoraFMS\Dashboard\Manager; -enterprise_hook('open_meta_frame'); - require_once $config['homedir'].'/include/functions_profile.php'; require_once $config['homedir'].'/include/functions_users.php'; require_once $config['homedir'].'/include/functions_groups.php'; @@ -270,7 +268,7 @@ if (is_ajax()) { } } - +enterprise_hook('open_meta_frame'); $tab = get_parameter('tab', 'user'); @@ -1942,7 +1940,10 @@ function delete_profile(event, btn) { var json = json_profile.val(); var test = JSON.parse(json); - test.splice(position-1, 1); + + var position_offset = ; + + test.splice(position-position_offset, 1); json_profile.val(JSON.stringify(test)); }