fix(editor): Fix stuck loading states (#3428)

This commit is contained in:
Mutasem Aldmour 2022-06-02 16:13:07 +02:00 committed by GitHub
parent 15a20d257d
commit 450a9aafea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -92,6 +92,9 @@ export default mixins(
}, },
computed: { computed: {
isExecutingPrevious(): boolean { isExecutingPrevious(): boolean {
if (!this.workflowRunning) {
return false;
}
const triggeredNode = this.$store.getters.executedNode; const triggeredNode = this.$store.getters.executedNode;
const executingNode = this.$store.getters.executingNode; const executingNode = this.$store.getters.executingNode;
if (this.activeNode && triggeredNode === this.activeNode.name && this.activeNode.name !== executingNode) { if (this.activeNode && triggeredNode === this.activeNode.name && this.activeNode.name !== executingNode) {
@ -103,6 +106,9 @@ export default mixins(
} }
return false; return false;
}, },
workflowRunning (): boolean {
return this.$store.getters.isActionActive('workflowRunning');
},
currentWorkflow(): Workflow { currentWorkflow(): Workflow {
return this.workflow as Workflow; return this.workflow as Workflow;
}, },

View file

@ -50,7 +50,7 @@ export default mixins(
nodeRunning (): boolean { nodeRunning (): boolean {
const triggeredNode = this.$store.getters.executedNode; const triggeredNode = this.$store.getters.executedNode;
const executingNode = this.$store.getters.executingNode; const executingNode = this.$store.getters.executingNode;
return executingNode === this.node.name || triggeredNode === this.node.name; return this.workflowRunning && (executingNode === this.node.name || triggeredNode === this.node.name);
}, },
workflowRunning (): boolean { workflowRunning (): boolean {
return this.$store.getters.isActionActive('workflowRunning'); return this.$store.getters.isActionActive('workflowRunning');