mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -47,14 +47,11 @@
|
||||
|
||||
import Vue from 'vue';
|
||||
import { nodeBase } from '@/components/mixins/nodeBase';
|
||||
import { nodeHelpers } from '@/components/mixins/nodeHelpers';
|
||||
import { workflowHelpers } from '@/components/mixins/workflowHelpers';
|
||||
|
||||
import {
|
||||
INode,
|
||||
INodeIssueObjectProperty,
|
||||
INodePropertyOptions,
|
||||
INodeTypeDescription,
|
||||
ITaskData,
|
||||
NodeHelpers,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
@@ -62,7 +59,7 @@ import NodeIcon from '@/components/NodeIcon.vue';
|
||||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
export default mixins(nodeBase, workflowHelpers).extend({
|
||||
export default mixins(nodeBase, nodeHelpers, workflowHelpers).extend({
|
||||
name: 'Node',
|
||||
components: {
|
||||
NodeIcon,
|
||||
@@ -133,41 +130,7 @@ export default mixins(nodeBase, workflowHelpers).extend({
|
||||
}
|
||||
},
|
||||
nodeSubtitle (): string | undefined {
|
||||
if (this.data.notesInFlow) {
|
||||
return this.data.notes;
|
||||
}
|
||||
|
||||
if (this.nodeType !== null && this.nodeType.subtitle !== undefined) {
|
||||
return this.workflow.expression.getSimpleParameterValue(this.data as INode, this.nodeType.subtitle, 'internal') as string | undefined;
|
||||
}
|
||||
|
||||
if (this.data.parameters.operation !== undefined) {
|
||||
const operation = this.data.parameters.operation as string;
|
||||
if (this.nodeType === null) {
|
||||
return operation;
|
||||
}
|
||||
|
||||
const operationData = this.nodeType.properties.find((property) => {
|
||||
return property.name === 'operation';
|
||||
});
|
||||
if (operationData === undefined) {
|
||||
return operation;
|
||||
}
|
||||
|
||||
if (operationData.options === undefined) {
|
||||
return operation;
|
||||
}
|
||||
|
||||
const optionData = operationData.options.find((option) => {
|
||||
return (option as INodePropertyOptions).value === this.data.parameters.operation;
|
||||
});
|
||||
if (optionData === undefined) {
|
||||
return operation;
|
||||
}
|
||||
|
||||
return optionData.name;
|
||||
}
|
||||
return undefined;
|
||||
return this.getNodeSubtitle(this.data, this.nodeType, this.workflow);
|
||||
},
|
||||
workflowRunning (): boolean {
|
||||
return this.$store.getters.isActionActive('workflowRunning');
|
||||
@@ -186,7 +149,7 @@ export default mixins(nodeBase, workflowHelpers).extend({
|
||||
this.disableNodes([this.data]);
|
||||
},
|
||||
executeNode () {
|
||||
this.$emit('runWorkflow', this.data.name);
|
||||
this.$emit('runWorkflow', this.data.name, 'Node.executeNode');
|
||||
},
|
||||
deleteNode () {
|
||||
Vue.nextTick(() => {
|
||||
|
||||
Reference in New Issue
Block a user