web app refactored service modal code and added proper support for sending current node services

This commit is contained in:
Blake J. Harnden 2018-05-15 16:28:41 -07:00
parent d4c05dab09
commit e11798bae5
3 changed files with 31 additions and 29 deletions

View file

@ -179,6 +179,7 @@ def get_session(session_id):
"y": node.position.y,
"z": node.position.z
},
"services": [x._name for x in node.services],
"url": "/sessions/%s/nodes/%s" % (session_id, node.objid)
})
@ -278,6 +279,7 @@ def get_node(session_id, node_id):
return jsonify(
name=node.name,
type=nodeutils.get_node_type(node.__class__).value,
services=[x._name for x in node.services],
model=node.type,
interfaces=interfaces,
linksurl="/sessions/%s/nodes/%s/links" % (session_id, node.objid)