#9783 Fixed networkmap 3

This commit is contained in:
Daniel Maya 2022-12-19 09:01:02 +01:00
parent 52e2ccba54
commit c9cac037f1

View File

@ -3112,7 +3112,7 @@ function modules_get_relations($params=[])
} }
$distinct = ''; $distinct = '';
if (empty($params)) { if (empty($params) || isset($params['distinct'])) {
$distinct = 'DISTINCT'; $distinct = 'DISTINCT';
} }
@ -3136,6 +3136,11 @@ function modules_get_relations($params=[])
); );
} }
$id_rt_filter = '';
if (isset($params['id_rt'])) {
$id_rt_filter = sprintf('AND tmr.id_rt = %d', $params['id_rt']);
}
$sql = sprintf( $sql = sprintf(
'SELECT %s tmr.id, tmr.module_a, tmr.module_b, 'SELECT %s tmr.id, tmr.module_a, tmr.module_b,
tmr.disable_update, tmr.type tmr.disable_update, tmr.type
@ -3153,7 +3158,8 @@ function modules_get_relations($params=[])
$module_type, $module_type,
$agent_filter, $agent_filter,
$disabled_update_filter, $disabled_update_filter,
$modules_type_filter $modules_type_filter,
$id_rt_filter
); );
return db_get_all_rows_sql($sql); return db_get_all_rows_sql($sql);