Browse Source

Fix the exception caused by Insufficient judgment conditions when the Bert network is running the monitoring node and add disabled state to tree node.

tags/v1.1.0
fengxuefeng 5 years ago
parent
commit
64b897dea4
4 changed files with 29 additions and 4 deletions
  1. +8
    -1
      mindinsight/ui/src/components/tree-node.vue
  2. +8
    -1
      mindinsight/ui/src/components/tree.vue
  3. +4
    -1
      mindinsight/ui/src/mixins/debugger-mixin.vue
  4. +9
    -1
      mindinsight/ui/src/views/debugger/debugger.vue

+ 8
- 1
mindinsight/ui/src/components/tree-node.vue View File

@@ -33,7 +33,7 @@
<el-checkbox v-if="showCheckbox && node.data.showCheckbox"
v-model="node.checked"
:indeterminate="node.indeterminate"
:disabled="!!node.disabled"
:disabled="disabled || !!node.disabled"
@click.native.stop
@change="handleCheckChange">
</el-checkbox>
@@ -52,6 +52,7 @@
v-for="child in node.childNodes"
:render-after-expand="renderAfterExpand"
:show-checkbox="showCheckbox"
:disabled="disabled"
:key="getNodeKey(child)"
:node="child"
@node-expand="handleChildNodeExpand">
@@ -66,5 +67,11 @@ export default {
extends: ElTreeNode,
name: 'ElTreeNode',
componentName: 'ElTreeNode',
props: {
disabled: {
type: Boolean,
default: false,
},
},
};
</script>

+ 8
- 1
mindinsight/ui/src/components/tree.vue View File

@@ -11,7 +11,8 @@
:node="child"
:props="props"
:render-after-expand="renderAfterExpand"
:show-checkbox="showCheckbox && child.data.showCheckbox"
:show-checkbox="showCheckbox"
:disabled="disabled"
:key="getNodeKey(child)"
:render-content="renderContent"
@node-expand="handleNodeExpand">
@@ -34,5 +35,11 @@ export default {
components: {
ElTreeNode,
},
props: {
disabled: {
type: Boolean,
default: false,
},
},
};
</script>

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

@@ -420,9 +420,12 @@ export default {
if (metadata.graph_name) {
graphName = metadata.graph_name;
}
if (this.nodeName) {
if (this.selectedNode.name) {
this.queryAllTreeData(this.nodeName, true, graphName);
}
if (nodeName) {
this.queryAllTreeData(nodeName, true, graphName);
}
}
}
if (metadata.step && metadata.step > this.metadata.step) {


+ 9
- 1
mindinsight/ui/src/views/debugger/debugger.vue View File

@@ -101,7 +101,8 @@ limitations under the License.
:highlight-current="true"
ref="tree"
@check="check"
:show-checkbox="!!curWatchPointId">
:show-checkbox="!!curWatchPointId"
:disabled="treeDisabled">
<span class="custom-tree-node"
slot-scope="{ node ,data }">
<span :class="{const:data.type==='Const' && curWatchPointId}">
@@ -131,6 +132,7 @@ limitations under the License.
@node-click="handleNodeClick"
:show-checkbox="!!curWatchPointId"
@check="searchCheck"
:disabled="treeDisabled"
ref="searchTree">
<span class="custom-tree-node"
slot-scope="{ node ,data }">
@@ -777,6 +779,7 @@ export default {
checked: 2,
noCheckbox: -1,
},
treeDisabled: false,
};
},
components: {debuggerTensor, tree},
@@ -797,6 +800,11 @@ export default {
if (oldValue === 'running' && newValue === 'waiting') {
this.getWatchpointHits();
}
if (newValue === 'running') {
this.treeDisabled = true;
} else {
this.treeDisabled = false;
}
if (newValue === 'pending') {
this.dialogVisible = true;
} else {


Loading…
Cancel
Save