@@ -258,21 +261,21 @@ limitations under the License.
{{ $t('public.sure') }}
{{$t('debugger.continue')}}
{{$t('debugger.pause')}}
{{$t('debugger.terminate')}}
@@ -402,7 +405,7 @@ limitations under the License.
{{ $t('debugger.view') }}
@@ -411,13 +414,14 @@ limitations under the License.
class="value-tip"
size="mini"
type="text"
- :disabled="metadata.state==='running'"
+ :disabled="metadata.state===state.running || metadata.state === state.sending"
:title="isNaN(scope.row.value)?'':scope.row.value"
@click="showTensor(scope.row,'value')">
{{ scope.row.value }}
{{ $t('debugger.compareToPre') }}
@@ -782,7 +786,16 @@ export default {
checked: 2,
noCheckbox: -1,
},
+ percentParams: ['zero_percentage_ge', 'range_percentage_lt', 'range_percentage_gt'],
+ oldState: '',
treeDisabled: false,
+ state: {
+ running: 'running',
+ pending: 'pending',
+ mismatch: 'mismatch',
+ sending: 'sending',
+ waiting: 'waiting',
+ },
};
},
components: {debuggerTensor, tree},
@@ -794,29 +807,36 @@ export default {
watch: {
'metadata.state': {
handler(newValue, oldValue) {
- if (newValue === 'pending' && oldValue !== undefined) {
- location.reload();
- }
- if (oldValue === 'pending' && newValue === 'waiting') {
- this.loadNode(this.node, this.resolve);
+ if (newValue === this.state.mismatch) {
+ this.conflictFlag = true;
+ } else {
+ this.conflictFlag = false;
}
- if (oldValue === 'running' && newValue === 'waiting') {
- this.getWatchpointHits();
+
+ if (newValue === this.state.pending) {
+ if (oldValue) {
+ location.reload();
+ } else {
+ this.dialogVisible = true;
+ }
+ } else {
+ this.dialogVisible = false;
}
- if (newValue === 'running') {
+ if (newValue === this.state.running || newValue === this.state.sending) {
this.treeDisabled = true;
} else {
this.treeDisabled = false;
}
- if (newValue === 'pending') {
- this.dialogVisible = true;
- } else {
- this.dialogVisible = false;
+ if (newValue === this.state.sending && oldValue) {
+ this.oldState = oldValue;
}
- if (newValue === 'mismatch') {
- this.conflictFlag = true;
- } else {
- this.conflictFlag = false;
+
+ if (newValue === this.state.waiting) {
+ if (this.oldState === this.state.pending || oldValue === this.state.pending) {
+ this.loadNode(this.node, this.resolve);
+ } else if (this.oldState === this.state.running || oldValue === this.state.running) {
+ this.getWatchpointHits();
+ }
}
},
deep: true,