From 1c4ec5e0b4cb2bb9e0da55b792b1cb8bf0b726a8 Mon Sep 17 00:00:00 2001 From: WeiFeng-mindinsight Date: Thu, 16 Jul 2020 19:03:43 +0800 Subject: [PATCH] fix graph bug that attributes of selected node show empty in content area --- mindinsight/ui/src/views/train-manage/graph.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mindinsight/ui/src/views/train-manage/graph.vue b/mindinsight/ui/src/views/train-manage/graph.vue index f8d4dbf..a30ae63 100644 --- a/mindinsight/ui/src/views/train-manage/graph.vue +++ b/mindinsight/ui/src/views/train-manage/graph.vue @@ -2029,9 +2029,13 @@ export default { selectedNode.type === 'name_scope' || selectedNode.type === 'aggregation_scope'; this.selectedNode.count = selectedNode.subnode_count; - this.selectedNode.info.attributes = JSON.parse( - JSON.stringify(selectedNode.attr), - ); + const attrTemp = JSON.parse(JSON.stringify(selectedNode.attr || {})); + this.selectedNode.info.attributes = Object.keys(attrTemp).map((key) => { + return { + name: key, + value: attrTemp[key], + }; + }); Object.keys(selectedNode.input).forEach((key) => { const value = this.getEdgeLabel(selectedNode.input[key]); -- GitLab