mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat(editor): Add node execution waiting state to new canvas (no-changelog) (#11083)
This commit is contained in:
parent
6a12f0c5fa
commit
cb4294b9f4
|
@ -190,6 +190,19 @@ describe('CanvasNodeDefault', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('waiting', () => {
|
||||||
|
it('should apply waiting class when node is waiting', () => {
|
||||||
|
const { getByText } = renderComponent({
|
||||||
|
global: {
|
||||||
|
provide: {
|
||||||
|
...createCanvasNodeProvide({ data: { execution: { running: true, waiting: '123' } } }),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
expect(getByText('Test Node').closest('.node')).toHaveClass('waiting');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('running', () => {
|
describe('running', () => {
|
||||||
it('should apply running class when node is running', () => {
|
it('should apply running class when node is running', () => {
|
||||||
const { getByText } = renderComponent({
|
const { getByText } = renderComponent({
|
||||||
|
|
|
@ -25,6 +25,8 @@ const {
|
||||||
isDisabled,
|
isDisabled,
|
||||||
isSelected,
|
isSelected,
|
||||||
hasPinnedData,
|
hasPinnedData,
|
||||||
|
executionStatus,
|
||||||
|
executionWaiting,
|
||||||
executionRunning,
|
executionRunning,
|
||||||
hasRunData,
|
hasRunData,
|
||||||
hasIssues,
|
hasIssues,
|
||||||
|
@ -53,6 +55,7 @@ const classes = computed(() => {
|
||||||
[$style.success]: hasRunData.value,
|
[$style.success]: hasRunData.value,
|
||||||
[$style.error]: hasIssues.value,
|
[$style.error]: hasIssues.value,
|
||||||
[$style.pinned]: hasPinnedData.value,
|
[$style.pinned]: hasPinnedData.value,
|
||||||
|
[$style.waiting]: executionWaiting.value ?? executionStatus.value === 'waiting',
|
||||||
[$style.running]: executionRunning.value,
|
[$style.running]: executionRunning.value,
|
||||||
[$style.configurable]: renderOptions.value.configurable,
|
[$style.configurable]: renderOptions.value.configurable,
|
||||||
[$style.configuration]: renderOptions.value.configuration,
|
[$style.configuration]: renderOptions.value.configuration,
|
||||||
|
@ -244,6 +247,10 @@ function openContextMenu(event: MouseEvent) {
|
||||||
background-color: var(--color-node-executing-background);
|
background-color: var(--color-node-executing-background);
|
||||||
border-color: var(--color-canvas-node-running-border-color, var(--color-node-running-border));
|
border-color: var(--color-canvas-node-running-border-color, var(--color-node-running-border));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.waiting {
|
||||||
|
border-color: var(--color-canvas-node-waiting-border-color, var(--color-secondary));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
|
|
|
@ -86,6 +86,10 @@ const hideNodeIssues = computed(() => false); // @TODO Implement this
|
||||||
color: var(--color-success);
|
color: var(--color-success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.waiting {
|
||||||
|
color: var(--color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
.pinnedData {
|
.pinnedData {
|
||||||
color: var(--color-secondary);
|
color: var(--color-secondary);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue