Merge branch 'ent-10052-nodo-ficticio-influye-en-el-estado-del-mapa-de-red' into 'develop'

Ent 10052 nodo ficticio influye en el estado del mapa de red

See merge request artica/pandorafms!5394
This commit is contained in:
Daniel Rodriguez 2023-01-13 09:48:49 +00:00
commit 9569e77766
3 changed files with 6 additions and 2 deletions

View File

@ -1672,7 +1672,7 @@ class NetworkMap
if (isset($source_data['color'])) { if (isset($source_data['color'])) {
$item['color'] = $source_data['color']; $item['color'] = $source_data['color'];
} else { } else {
if (empty($node['status']) && empty($node['id_module']) && !empty($node['style']['id_networkmap'])) { if (empty($node['style']['id_networkmap']) === false) {
$status_aux = get_status_color_networkmap_fictional_point($node['style']['id_networkmap']); $status_aux = get_status_color_networkmap_fictional_point($node['style']['id_networkmap']);
$item['color'] = $status_aux; $item['color'] = $status_aux;
} else { } else {

View File

@ -3393,7 +3393,7 @@ function get_status_color_networkmap_fictional_point($id_networkmap, $parent='')
$exit = false; $exit = false;
foreach ($agents as $agent) { foreach ($agents as $agent) {
if ($agent['source_data'] == -1) { if ($agent['source_data'] == -1 || $agent['type'] == 2) {
continue; continue;
} }

View File

@ -881,7 +881,11 @@ if (is_ajax() === true) {
$shape = get_parameter('shape', 0); $shape = get_parameter('shape', 0);
$radious = (int) get_parameter('radious', 20); $radious = (int) get_parameter('radious', 20);
$color = get_parameter('color', 0); $color = get_parameter('color', 0);
$networkmap = (int) get_parameter('networkmap', 0); $networkmap = (int) get_parameter('networkmap', 0);
if (empty($networkmap) === false) {
$color = get_status_color_networkmap_fictional_point($networkmap);
}
$return = []; $return = [];
$return['correct'] = false; $return['correct'] = false;