fixed map IPAM

Former-commit-id: a1334a1691a3e861f2510ac7d440f5730928ad9a
This commit is contained in:
Daniel Barbero Martin 2019-04-08 18:28:27 +02:00
parent 79bd37ee5b
commit d5b1ac5565
1 changed files with 20 additions and 0 deletions

View File

@ -1242,6 +1242,11 @@ class NetworkMap
return ''; return '';
} }
if ($this->mapOptions['fixed_positions']) {
// Ignore.
return;
}
$dot_str = ''; $dot_str = '';
// Color is being printed by D3, not graphviz. // Color is being printed by D3, not graphviz.
@ -1259,6 +1264,15 @@ class NetworkMap
$radius /= GRAPHVIZ_CONVERSION_FACTOR; $radius /= GRAPHVIZ_CONVERSION_FACTOR;
if (is_array($label)) {
$label = array_reduce(
function ($carry, $item) {
$carry .= $item;
return $carry;
}
);
}
if (strlen($label) > 16) { if (strlen($label) > 16) {
$label = ui_print_truncate_text($label, 16, false, true, false); $label = ui_print_truncate_text($label, 16, false, true, false);
} }
@ -2079,6 +2093,10 @@ class NetworkMap
'id_source' => $id_source, 'id_source' => $id_source,
'label' => $label, 'label' => $label,
'image' => null, 'image' => null,
'radius' => max(
$node['width'],
$node['height']
),
] ]
); );
@ -2454,6 +2472,8 @@ class NetworkMap
$this->map['height'] = $this->mapOptions['height']; $this->map['height'] = $this->mapOptions['height'];
} }
$this->map['filter']['z_dash'] = $this->mapOptions['z_dash'];
if (is_array($graph) === true) { if (is_array($graph) === true) {
$nodes = $graph['nodes']; $nodes = $graph['nodes'];
$relations = $graph['relations']; $relations = $graph['relations'];