mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 16:44:07 -08:00
fix(editor): Show node executing status shortly before switching to success on new canvas (#11675)
This commit is contained in:
parent
c0aa67b8f0
commit
b0ba24cbbc
|
@ -12,7 +12,7 @@ const {
|
||||||
hasIssues,
|
hasIssues,
|
||||||
executionStatus,
|
executionStatus,
|
||||||
executionWaiting,
|
executionWaiting,
|
||||||
executionRunning,
|
executionRunningThrottled,
|
||||||
hasRunData,
|
hasRunData,
|
||||||
runDataIterations,
|
runDataIterations,
|
||||||
isDisabled,
|
isDisabled,
|
||||||
|
@ -58,7 +58,7 @@ const hideNodeIssues = computed(() => false); // @TODO Implement this
|
||||||
<!-- Do nothing, unknown means the node never executed -->
|
<!-- Do nothing, unknown means the node never executed -->
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="executionRunning || executionStatus === 'running'"
|
v-else-if="executionRunningThrottled || executionStatus === 'running'"
|
||||||
data-test-id="canvas-node-status-running"
|
data-test-id="canvas-node-status-running"
|
||||||
:class="[$style.status, $style.running]"
|
:class="[$style.status, $style.running]"
|
||||||
>
|
>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { CanvasNodeKey } from '@/constants';
|
||||||
import { computed, inject } from 'vue';
|
import { computed, inject } from 'vue';
|
||||||
import type { CanvasNodeData } from '@/types';
|
import type { CanvasNodeData } from '@/types';
|
||||||
import { CanvasNodeRenderType, CanvasConnectionMode } from '@/types';
|
import { CanvasNodeRenderType, CanvasConnectionMode } from '@/types';
|
||||||
|
import { refThrottled } from '@vueuse/core';
|
||||||
|
|
||||||
export function useCanvasNode() {
|
export function useCanvasNode() {
|
||||||
const node = inject(CanvasNodeKey);
|
const node = inject(CanvasNodeKey);
|
||||||
|
@ -58,6 +59,7 @@ export function useCanvasNode() {
|
||||||
const executionStatus = computed(() => data.value.execution.status);
|
const executionStatus = computed(() => data.value.execution.status);
|
||||||
const executionWaiting = computed(() => data.value.execution.waiting);
|
const executionWaiting = computed(() => data.value.execution.waiting);
|
||||||
const executionRunning = computed(() => data.value.execution.running);
|
const executionRunning = computed(() => data.value.execution.running);
|
||||||
|
const executionRunningThrottled = refThrottled(executionRunning, 300);
|
||||||
|
|
||||||
const runDataOutputMap = computed(() => data.value.runData.outputMap);
|
const runDataOutputMap = computed(() => data.value.runData.outputMap);
|
||||||
const runDataIterations = computed(() => data.value.runData.iterations);
|
const runDataIterations = computed(() => data.value.runData.iterations);
|
||||||
|
@ -89,6 +91,7 @@ export function useCanvasNode() {
|
||||||
executionStatus,
|
executionStatus,
|
||||||
executionWaiting,
|
executionWaiting,
|
||||||
executionRunning,
|
executionRunning,
|
||||||
|
executionRunningThrottled,
|
||||||
render,
|
render,
|
||||||
eventBus,
|
eventBus,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue