fixed bugs in meta profiles management

This commit is contained in:
alejandro.campos@artica.es 2022-11-23 16:29:27 +01:00
parent 33966c0ace
commit b9242b17d8
2 changed files with 6 additions and 5 deletions

View File

@ -42,7 +42,6 @@ require_once $config['homedir'].'/include/functions_users.php';
if (is_metaconsole() === true) { if (is_metaconsole() === true) {
enterprise_include_once('include/functions_metaconsole.php'); enterprise_include_once('include/functions_metaconsole.php');
enterprise_include_once('meta/include/functions_agents_meta.php'); enterprise_include_once('meta/include/functions_agents_meta.php');
enterprise_hook('open_meta_frame');
} }
if (is_ajax() === true) { if (is_ajax() === true) {
@ -270,6 +269,7 @@ if (is_ajax() === true) {
return; return;
} }
enterprise_hook('open_meta_frame');
$tab = (string) get_parameter('tab', 'groups'); $tab = (string) get_parameter('tab', 'groups');

View File

@ -35,8 +35,6 @@ require_once $config['homedir'].'/vendor/autoload.php';
use PandoraFMS\Dashboard\Manager; use PandoraFMS\Dashboard\Manager;
enterprise_hook('open_meta_frame');
require_once $config['homedir'].'/include/functions_profile.php'; require_once $config['homedir'].'/include/functions_profile.php';
require_once $config['homedir'].'/include/functions_users.php'; require_once $config['homedir'].'/include/functions_users.php';
require_once $config['homedir'].'/include/functions_groups.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'); $tab = get_parameter('tab', 'user');
@ -1942,7 +1940,10 @@ function delete_profile(event, btn) {
var json = json_profile.val(); var json = json_profile.val();
var test = JSON.parse(json); var test = JSON.parse(json);
test.splice(position-1, 1);
var position_offset = <?php echo (is_metaconsole() === true) ? 2 : 1; ?>;
test.splice(position-position_offset, 1);
json_profile.val(JSON.stringify(test)); json_profile.val(JSON.stringify(test));
} }