Merge "Fixed output of lists in topology viewer"
This commit is contained in:
commit
321ae70503
@ -150,6 +150,14 @@ def _create_ext_network_node(name):
|
||||
return node
|
||||
|
||||
|
||||
def _convert_lists(node_data):
|
||||
for key, value in six.iteritems(node_data):
|
||||
if isinstance(value, list) and all(
|
||||
map(lambda s: not isinstance(s, (dict, list)), value)):
|
||||
new_value = ', '.join(str(v) for v in value)
|
||||
node_data[key] = new_value
|
||||
|
||||
|
||||
def _split_seq_by_predicate(seq, predicate):
|
||||
holds, not_holds = [], []
|
||||
for elt in seq:
|
||||
@ -202,6 +210,7 @@ def render_d3_data(request, environment):
|
||||
def rec(node_data, node_key, parent_node=None):
|
||||
if not isinstance(node_data, dict):
|
||||
return
|
||||
_convert_lists(node_data)
|
||||
node_type = node_data.get('?', {}).get('type')
|
||||
node_id = node_data.get('?', {}).get('id')
|
||||
atomics, containers = _split_seq_by_predicate(
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- VM IP addresses are now properly displayed in the environment topology
|
||||
viewer.
|
Loading…
x
Reference in New Issue
Block a user