mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
✨ Add more frontend hooks (#1687)
* ⚡ add hook for nodecreatelist mount * ⚡ add hook for nodeCreateList selectedTypeChanged * ⚡ add hook for nodeCreateList nodeFilterChanged * ⚡ add hook for nodeCreateList filteredNodeTypesComputed * ⚡ add hook for nodeView.activeNodeChanged * ⚡ add hook for credentialsEdit credentialTypeChanged * ⚡ add hook for onDocumentationUrlClick * ⚡ add hook for executionsList openDialog * ⚡ add hook for execution open * ⚡ add hook for credentialsList dialogVisibleChanged * ⚡ add hook for workflowSettings * ⚡ add hook for showMessage showError * ⚡ add hook for nodeView createNodeActiveChanged * ⚡ add hook for nodeView addNodeButton * ⚡ cleanup * ⚡ add hook for workflowRun runWorkflow * ⚡ add hook for pushConnection executionFinished * ⚡ add hook for runData.displayModeChanged * ⚡ update nodeCreateList.nodeFilterChanged hook * ⚡ update dataDisplay nodeTypeChanged hook * ⚡ update dataDisplay nodeTypeChanged hook * ⚡ update dataDisplay nodeTypeChanged hook * ⚡ update error data in hooks * update workflowRun runError hook * ⚡ Minor improvements Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -53,7 +53,7 @@ export const workflowRun = mixins(
|
||||
|
||||
return response;
|
||||
},
|
||||
async runWorkflow (nodeName: string): Promise<IExecutionPushResponse | undefined> {
|
||||
async runWorkflow (nodeName: string, source?: string): Promise<IExecutionPushResponse | undefined> {
|
||||
if (this.$store.getters.isActionActive('workflowRunning') === true) {
|
||||
return;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ export const workflowRun = mixins(
|
||||
duration: 0,
|
||||
});
|
||||
this.$titleSet(workflow.name as string, 'ERROR');
|
||||
this.$externalHooks().run('workflow.runError', { errorMessages });
|
||||
this.$externalHooks().run('workflowRun.runError', { errorMessages, nodeName });
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -172,7 +172,11 @@ export const workflowRun = mixins(
|
||||
};
|
||||
this.$store.commit('setWorkflowExecutionData', executionData);
|
||||
|
||||
return await this.runWorkflowApi(startRunData);
|
||||
const runWorkflowApiResponse = await this.runWorkflowApi(startRunData);
|
||||
|
||||
this.$externalHooks().run('workflowRun.runWorkflow', { nodeName, source });
|
||||
|
||||
return runWorkflowApiResponse;
|
||||
} catch (error) {
|
||||
this.$titleSet(workflow.name as string, 'ERROR');
|
||||
this.$showError(error, 'Problem running workflow', 'There was a problem running the workflow:');
|
||||
|
||||
Reference in New Issue
Block a user