#11487 Fixed subgroups

This commit is contained in:
Daniel Maya 2023-07-18 10:18:30 +02:00
parent 2a03a9ae2f
commit 5806da78dd
2 changed files with 18 additions and 13 deletions

View File

@ -4983,19 +4983,18 @@ function graph_monitor_wheel($width=550, $height=600, $filter=false)
$filter_module_group = (!empty($filter) && !empty($filter['module_group'])) ? $filter['module_group'] : false;
if ($filter['group'] != 0) {
$filter_subgroups = '';
if (!$filter['dont_show_subgroups']) {
$filter_subgroups = ' || parent IN ('.$filter['group'].')';
if ($filter['dont_show_subgroups'] === false) {
$groups = groups_get_children($filter['group']);
$groups_ax = [];
foreach ($groups as $g) {
$groups_ax[$g['id_grupo']] = $g;
}
$groups = $groups_ax;
} else {
$groups = groups_get_group_by_id($filter['group']);
$groups[$group['id_grupo']] = $group;
}
$groups = db_get_all_rows_sql('SELECT * FROM tgrupo where id_grupo IN ('.$filter['group'].') '.$filter_subgroups);
$groups_ax = [];
foreach ($groups as $g) {
$groups_ax[$g['id_grupo']] = $g;
}
$groups = $groups_ax;
} else {
$groups = users_get_groups(false, 'AR', false, true, (!empty($filter) && isset($filter['group']) ? $filter['group'] : null));
}

View File

@ -205,9 +205,15 @@ if ($edit_networkmap) {
$button = [];
if ($edit_networkmap === true) {
if (empty($method) === false && $method === 'radial_dinamic') {
$url = 'index.php?sec=network&sec2=operation/agentes/networkmap.dinamic&activeTab=radial_dynamic&id_networkmap='.$id;
} else {
$url = 'index.php?sec=network&sec2=operation/agentes/pandora_networkmap&tab=view&id_networkmap='.$id;
}
$button['map'] = [
'active' => false,
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/pandora_networkmap&tab=view&id_networkmap='.$id.'">'.html_print_image(
'text' => '<a href="'.$url.'">'.html_print_image(
'images/network@svg.svg',
true,
[