From 683d04e096f7cd56d10632e863e65e6452924e3c Mon Sep 17 00:00:00 2001 From: WeiFeng-mindinsight Date: Sat, 12 Sep 2020 18:49:08 +0800 Subject: [PATCH] UI fix bug of debugger page --- mindinsight/ui/src/locales/en-us.json | 1 - mindinsight/ui/src/locales/zh-cn.json | 1 - .../ui/src/views/debugger/debugger.vue | 23 +++++++------------ 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/mindinsight/ui/src/locales/en-us.json b/mindinsight/ui/src/locales/en-us.json index b1fcf1dd..4fe4040f 100644 --- a/mindinsight/ui/src/locales/en-us.json +++ b/mindinsight/ui/src/locales/en-us.json @@ -528,7 +528,6 @@ "5054B081": "Incorrect parameter value.", "5054B082": "Parameters are missing.", "5054B083": "Running error.", - "5054B084": "Unknown error.", "5054B100": "The node does not exist.", "5054B101": "The graph does not exist.", "5054B180": "Failed to create the watchpoint.", diff --git a/mindinsight/ui/src/locales/zh-cn.json b/mindinsight/ui/src/locales/zh-cn.json index 23fd72f1..cb3d94ba 100644 --- a/mindinsight/ui/src/locales/zh-cn.json +++ b/mindinsight/ui/src/locales/zh-cn.json @@ -528,7 +528,6 @@ "5054B081": "参数值错误", "5054B082": "参数缺失", "5054B083": "运行错误", - "5054B084": "未明确错误", "5054B100": "节点不存在", "5054B101": "图不存在", "5054B180": "监测点创建失败", diff --git a/mindinsight/ui/src/views/debugger/debugger.vue b/mindinsight/ui/src/views/debugger/debugger.vue index 44349c40..0c6a955d 100644 --- a/mindinsight/ui/src/views/debugger/debugger.vue +++ b/mindinsight/ui/src/views/debugger/debugger.vue @@ -174,7 +174,7 @@ limitations under the License. v-for="(watchpoint,index) in item.watch_points" :key="index"> id:{{ watchpoint.id }} condition :{{ - this.conditionMappings[watchpoint.watch_condition.condition] + conditionMappings[watchpoint.watch_condition.condition] }} {{watchpoint.watch_condition.param}} @@ -917,16 +917,11 @@ export default { * Query tensor value * @param { Object } data node info */ - queryTensorValue(data) { + retrieveTensorHistory(data) { const params = { - mode: 'node', - params: { - node_type: data.type, - watch_point_id: this.curWatchPointId, - name: data.name, - }, + name: data.name, }; - RequestService.retrieve(params).then( + RequestService.retrieveTensorHistory(params).then( (res) => { if (res.data && res.data.metadata) { this.dealMetadata(res.data.metadata); @@ -1089,14 +1084,13 @@ export default { } if ( res.data.receive_tensor && - res.data.receive_tensor.metadata && - res.data.receive_tensor.metadata.step >= this.metadata.step && + res.data.metadata && + res.data.metadata.step >= this.metadata.step && res.data.receive_tensor.node_name === this.$refs.tree.getCurrentKey() ) { - this.queryTensorValue({ + this.retrieveTensorHistory({ name: res.data.receive_tensor.node_name, - type: res.data.receive_tensor.node_type, }); } if ( @@ -3487,9 +3481,8 @@ export default { clearTimeout(this.graph.timer); } this.graph.timer = setTimeout(() => { - this.queryTensorValue({ + this.retrieveTensorHistory({ name: path[0].replace('_unfold', ''), - type: this.allGraphData[path[0].replace('_unfold', '')].type, }); }, 500); }