mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
feat(editor): block UI in NDV when workflow is listening to events (#4390)
* feature: block UI in NDV when workflow is listening to events * feature: hide stop listening button in parameters pane and show stop listening button in input pane for webhook * feature: create block UI design system component * fix: add back accidentally removed prop * fix(editor): extend node settings event listener button functionality * refactor(editor): using composition API in BlockUi component
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
:linkedRuns="linked"
|
||||
:sessionId="sessionId"
|
||||
:isReadOnly="readOnly || hasForeignCredential"
|
||||
:blockUI="blockUi && isTriggerNode"
|
||||
@linkRun="onLinkRunToOutput"
|
||||
@unlinkRun="() => onUnlinkRun('output')"
|
||||
@runChange="onRunOutputIndexChange"
|
||||
@@ -87,8 +88,10 @@
|
||||
:sessionId="sessionId"
|
||||
:nodeType="activeNodeType"
|
||||
:isReadOnly="readOnly || hasForeignCredential"
|
||||
:blockUI="blockUi && showTriggerPanel"
|
||||
@valueChanged="valueChanged"
|
||||
@execute="onNodeExecute"
|
||||
@stopExecution="onStopExecution"
|
||||
@activate="onWorkflowActivate"
|
||||
/>
|
||||
<a
|
||||
@@ -225,14 +228,10 @@ export default mixins(
|
||||
return null;
|
||||
},
|
||||
showTriggerPanel(): boolean {
|
||||
const isWebhookBasedNode = this.activeNodeType && this.activeNodeType.webhooks && this.activeNodeType.webhooks.length;
|
||||
const isPollingNode = this.activeNodeType && this.activeNodeType.polling;
|
||||
const override = this.activeNodeType && this.activeNodeType.triggerPanel;
|
||||
return Boolean(
|
||||
!this.readOnly &&
|
||||
this.isTriggerNode &&
|
||||
(isWebhookBasedNode || isPollingNode || override),
|
||||
);
|
||||
const isWebhookBasedNode = !!this.activeNodeType?.webhooks?.length;
|
||||
const isPollingNode = this.activeNodeType?.polling;
|
||||
const override = !!this.activeNodeType?.triggerPanel;
|
||||
return !this.readOnly && this.isTriggerNode && (isWebhookBasedNode || isPollingNode || override);
|
||||
},
|
||||
workflow(): Workflow {
|
||||
return this.getCurrentWorkflow();
|
||||
@@ -343,6 +342,15 @@ export default mixins(
|
||||
outputPanelEditMode(): { enabled: boolean; value: string; } {
|
||||
return this.$store.getters['ndv/outputPanelEditMode'];
|
||||
},
|
||||
isWorkflowRunning(): boolean {
|
||||
return this.$store.getters.isActionActive('workflowRunning');
|
||||
},
|
||||
isExecutionWaitingForWebhook(): boolean {
|
||||
return this.$store.getters.executionWaitingForWebhook;
|
||||
},
|
||||
blockUi(): boolean {
|
||||
return this.isWorkflowRunning || this.isExecutionWaitingForWebhook;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
activeNode(node: INodeUi | null) {
|
||||
@@ -608,8 +616,13 @@ export default mixins(
|
||||
});
|
||||
},
|
||||
checkForeignCredentials() {
|
||||
const issues = this.getNodeCredentialIssues(this.activeNode);
|
||||
this.hasForeignCredential = !!issues?.credentials?.foreign;
|
||||
if(this.activeNode){
|
||||
const issues = this.getNodeCredentialIssues(this.activeNode);
|
||||
this.hasForeignCredential = !!issues?.credentials?.foreign;
|
||||
}
|
||||
},
|
||||
onStopExecution(){
|
||||
this.$emit('stopExecution');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user