Fixed color of fictional node

This commit is contained in:
Daniel Maya 2022-01-27 12:55:42 +01:00
parent 4da16bedf8
commit 561589423d
2 changed files with 13 additions and 5 deletions

View File

@ -1672,10 +1672,15 @@ class NetworkMap
if (isset($source_data['color'])) {
$item['color'] = $source_data['color'];
} else {
$item['color'] = self::getColorByStatus(
$node['status'],
(bool) $node['id_module']
);
if (empty($node['status']) && empty($node['id_module']) && !empty($node['style']['id_networkmap'])) {
$status_aux = get_status_color_networkmap_fictional_point($node['style']['id_networkmap']);
$item['color'] = $status_aux;
} else {
$item['color'] = self::getColorByStatus(
$node['status'],
(bool) $node['id_module']
);
}
}
break;
}

View File

@ -3280,7 +3280,10 @@ function get_status_color_networkmap_fictional_point($id_networkmap, $parent='')
if ((int) $id_networkmap !== 0) {
$agents = db_get_all_rows_filter(
'titem',
['id_map' => $id_networkmap]
[
'id_map' => $id_networkmap,
'deleted' => 0,
]
);
if ((bool) $agents === false) {