mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat(Data Table Node): Add URL to data table resource locator (no-changelog) (#18840)
This commit is contained in:
@@ -68,6 +68,10 @@ export class DataStoreProxyService implements DataStoreProxyProvider {
|
||||
private makeAggregateOperations(projectId: string): IDataStoreProjectAggregateService {
|
||||
const dataStoreService = this.dataStoreService;
|
||||
return {
|
||||
getProjectId() {
|
||||
return projectId;
|
||||
},
|
||||
|
||||
async getManyAndCount(options: ListDataStoreOptions = {}) {
|
||||
const serviceOptions: DataStoreListOptions = {
|
||||
...options,
|
||||
|
||||
@@ -29,6 +29,7 @@ export async function tableSearch(
|
||||
return {
|
||||
name: row.name,
|
||||
value: row.id,
|
||||
url: `/projects/${proxy.getProjectId()}/datatables/${row.id}`,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -42,7 +43,7 @@ export async function tableSearch(
|
||||
|
||||
export async function getDataTableColumns(this: ILoadOptionsFunctions) {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-miscased-id, n8n-nodes-base/node-param-display-name-miscased
|
||||
const returnData: INodePropertyOptions[] = [{ name: 'id - (string)', value: 'id' }];
|
||||
const returnData: INodePropertyOptions[] = [{ name: 'id - (number)', value: 'id' }];
|
||||
const proxy = await getDataTableProxyLoadOptions(this);
|
||||
const columns = await proxy.getColumns();
|
||||
for (const column of columns) {
|
||||
|
||||
@@ -86,6 +86,8 @@ export type DataStoreRowsReturn = DataStoreRowReturn[];
|
||||
|
||||
// APIs for a data store service operating on a specific projectId
|
||||
export interface IDataStoreProjectAggregateService {
|
||||
getProjectId(): string;
|
||||
|
||||
createDataStore(options: CreateDataStoreOptions): Promise<DataStore>;
|
||||
|
||||
getManyAndCount(options: ListDataStoreOptions): Promise<{ count: number; data: DataStore[] }>;
|
||||
|
||||
Reference in New Issue
Block a user