How to use the n8n-workflow.NodeHelpers.getNodeParametersIssues function in n8n-workflow

To help you get started, we’ve selected a few n8n-workflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github n8n-io / n8n / packages / editor-ui / src / components / NodeSettings.vue View on Github external
for (const key of Object.keys(nodeParameters as object)) {
						if (nodeParameters && nodeParameters[key] !== null && nodeParameters[key] !== undefined) {
							this.setValue(`parameters.${key}`, nodeParameters[key] as string);
						}
					}

					// Update the data in vuex
					const updateInformation = {
						name: node.name,
						value: nodeParameters,
					};
					this.$store.commit('setNodeParameters', updateInformation);

					// All data got updated everywhere so update now the issues
					const fullNodeIssues: INodeIssues | null = NodeHelpers.getNodeParametersIssues(nodeType.properties, node);

					let newIssues: INodeIssueObjectProperty | null = null;
					if (fullNodeIssues !== null) {
						newIssues = fullNodeIssues.parameters!;
					}

					this.$store.commit('setNodeIssue', {
						node: node.name,
						type: 'parameters',
						value: newIssues,
					} as INodeIssueData);

					this.updateNodeCredentialIssues(node);
				} else {
					// A property on the node itself changed
github n8n-io / n8n / packages / editor-ui / src / components / mixins / nodeHelpers.ts View on Github external
return null;
				}

				if (nodeType === null) {
					// Node type is not known
					if (!ignoreIssues.includes('typeUnknown')) {
						nodeIssues = {
							typeUnknown: true,
						};
					}
				} else {
					// Node type is known

					// Add potential parameter issues
					if (!ignoreIssues.includes('parameters')) {
						nodeIssues = NodeHelpers.getNodeParametersIssues(nodeType.properties, node);
					}

					if (!ignoreIssues.includes('credentials')) {
						// Add potential credential issues
						const nodeCredentialIssues = this.getNodeCredentialIssues(node, nodeType);
						if (nodeIssues === null) {
							nodeIssues = nodeCredentialIssues;
						} else {
							NodeHelpers.mergeIssues(nodeIssues, nodeCredentialIssues);
						}
					}
				}

				if (this.hasNodeExecutionIssues(node) === true && !ignoreIssues.includes('execution')) {
					if (nodeIssues === null) {
						nodeIssues = {};