first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
import type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
||||
import { NodeConnectionTypes } from 'n8n-workflow';
|
||||
|
||||
import { router } from './actions/router';
|
||||
import * as row from './actions/row/Row.resource';
|
||||
import * as table from './actions/table/Table.resource';
|
||||
import {
|
||||
getConditionsForColumn,
|
||||
getDataTableColumns,
|
||||
getDataTables,
|
||||
tableSearch,
|
||||
} from './common/methods';
|
||||
|
||||
export class DataTable implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Data table',
|
||||
name: 'dataTable',
|
||||
icon: 'fa:table',
|
||||
iconColor: 'orange-red',
|
||||
group: ['input', 'transform'],
|
||||
version: [1, 1.1],
|
||||
subtitle: '={{$parameter["action"]}}',
|
||||
description: 'Permanently save data across workflow executions in a table',
|
||||
defaults: {
|
||||
name: 'Data table',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
hints: [
|
||||
{
|
||||
message: 'The selected data table has no columns.',
|
||||
displayCondition:
|
||||
'={{ $parameter.dataTableId !== "" && $parameter?.columns?.mappingMode === "defineBelow" && !$parameter?.columns?.schema?.length }}',
|
||||
whenToDisplay: 'beforeExecution',
|
||||
location: 'ndv',
|
||||
type: 'info',
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'Row',
|
||||
value: 'row',
|
||||
},
|
||||
{
|
||||
name: 'Table',
|
||||
value: 'table',
|
||||
},
|
||||
],
|
||||
default: 'row',
|
||||
},
|
||||
...row.description,
|
||||
...table.description,
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
listSearch: {
|
||||
tableSearch,
|
||||
},
|
||||
loadOptions: {
|
||||
getDataTableColumns,
|
||||
getConditionsForColumn,
|
||||
},
|
||||
resourceMapping: {
|
||||
getDataTables,
|
||||
},
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions) {
|
||||
return await router.call(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user