Browse Source

!1078 UI fix bug that loading not disappear after click next node at last step and reset data of watchpoint hits

From: @huang_wei_feng4
Reviewed-by: @panhui3,@lilongfei15,@wangyue01
Signed-off-by: @wangyue01
pull/1078/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
1766db8442
2 changed files with 22 additions and 5 deletions
  1. +15
    -1
      mindinsight/ui/src/mixins/debugger-mixin.vue
  2. +7
    -4
      mindinsight/ui/src/views/debugger/debugger.vue

+ 15
- 1
mindinsight/ui/src/mixins/debugger-mixin.vue View File

@@ -152,9 +152,11 @@ export default {
}
}
}
this.loadingInstance.close();
},
(err) => {
this.showErrorMsg(err);
this.loadingInstance.close();
},
);
},
@@ -163,7 +165,9 @@ export default {
*/
getNextNodeInfo() {
this.loadingInstance = this.$loading(this.loadingOption);
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
const params = {
mode: 'continue',
level: 'node',
@@ -449,6 +453,8 @@ export default {
}
}
}
} else {
this.loadingInstance.close();
}
}
if (metadata.step && metadata.step > this.metadata.step) {
@@ -498,6 +504,7 @@ export default {
this.radio1 = 'hit';
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
this.searchWatchpointHits(true);
}

@@ -531,6 +538,7 @@ export default {
if (type !== 3) {
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
}
const params = {};
if (type === 0) {
@@ -591,6 +599,7 @@ export default {
this.enableRecheck = res.data.metadata.enable_recheck;
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
}
if (res.data.metadata.state) {
this.metadata.state = res.data.metadata.state;
@@ -1560,6 +1569,7 @@ export default {
}
if (res.data && res.data.watch_point_hits) {
this.hitsOutdated = res.data.outdated;
this.watchPointHits = [];
this.pagination.total = res.data.total;
this.pagination.currentPage = res.data.offset + 1;
this.dealWatchpointHits(res.data.watch_point_hits);
@@ -1573,6 +1583,7 @@ export default {
this.searchWatchpointHits(false);
}
} else {
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
}
@@ -1594,7 +1605,6 @@ export default {
}
},
dealWatchpointHits(data) {
this.watchPointHits = [];
if (data && data.length) {
data.forEach((hit) => {
const obj = {
@@ -1636,6 +1646,10 @@ export default {
this.watchPointHits.push(obj);
});
this.focusWatchpointHit();
} else {
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
}
},
focusWatchpointHit() {


+ 7
- 4
mindinsight/ui/src/views/debugger/debugger.vue View File

@@ -887,6 +887,7 @@ export default {
} else if (this.oldState === this.state.running || oldValue === this.state.running) {
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
this.searchWatchpointHits(true);
}
}
@@ -1040,7 +1041,7 @@ export default {
(res) => {
if (res.data && res.data.graph) {
const graph = res.data.graph;
this.curNodeData = graph.nodes.map((val) => {
this.origialTree = graph.nodes.map((val) => {
return {
label: val.name.split('/').pop(),
...val,
@@ -1049,17 +1050,17 @@ export default {
});
this.node.childNodes = [];
this.curWatchPointId = id;
this.resolve(this.curNodeData);
this.resolve(this.origialTree);
this.$refs.tree.getCheckedKeys().forEach((val) => {
this.$refs.tree.setChecked(val, false);
});
// watched 0:unchecked 1:indeterminate 2:checked -1:no checkbox
this.defaultCheckedArr = this.curNodeData
this.defaultCheckedArr = this.origialTree
.filter((val) => {
return val.watched === this.checkboxStatus.checked;
})
.map((val) => val.name);
const halfSelectArr = this.curNodeData
const halfSelectArr = this.origialTree
.filter((val) => {
return val.watched === this.checkboxStatus.indeterminate;
})
@@ -1274,6 +1275,7 @@ export default {
continueTo() {
this.pagination.currentPage = 1;
this.watchPointHits = [];
this.pagination.total = 0;
const params = {
mode: 'continue',
level: 'node',
@@ -1516,6 +1518,7 @@ export default {
}
}
this.isHitIntoView = true;
this.loadingInstance.close();
},
/**
* The node information of the selected node.


Loading…
Cancel
Save