feat: Ado 1296 spike credential setup in templates (#7786)

- Add a 'Setup template credentials' view to setup the credentials of a
template before it is created
This commit is contained in:
Tomi Turtiainen
2023-11-27 16:30:28 +02:00
committed by GitHub
parent 27e048c201
commit aae45b043b
25 changed files with 1423 additions and 20 deletions

View File

@@ -7,7 +7,6 @@ import { N8nConnector } from '@/plugins/connectors/N8nCustomConnector';
import type {
ConnectionTypes,
IConnection,
INode,
ITaskData,
INodeExecutionData,
NodeInputConnections,
@@ -336,7 +335,7 @@ export const addOverlays = (connection: Connection, overlays: OverlaySpec[]) =>
});
};
export const getLeftmostTopNode = (nodes: INodeUi[]): INodeUi => {
export const getLeftmostTopNode = <T extends { position: XYPosition }>(nodes: T[]): T => {
return nodes.reduce((leftmostTop, node) => {
if (node.position[0] > leftmostTop.position[0] || node.position[1] > leftmostTop.position[1]) {
return leftmostTop;
@@ -963,7 +962,7 @@ export const getInputEndpointUUID = (
return `${nodeId}${INPUT_UUID_KEY}${getScope(connectionType) || ''}${inputIndex}`;
};
export const getFixedNodesList = (workflowNodes: INode[]) => {
export const getFixedNodesList = <T extends { position: XYPosition }>(workflowNodes: T[]): T[] => {
const nodes = [...workflowNodes];
if (nodes.length) {