feat(editor): Insights dashboard (#13739)

Co-authored-by: Guillaume Jacquart <jacquart.guillaume@gmail.com>
Co-authored-by: Raúl Gómez Morales <raul00gm@gmail.com>
This commit is contained in:
Csaba Tuncsik
2025-04-03 16:24:44 +02:00
committed by GitHub
parent 7379f44896
commit 90ba680631
30 changed files with 1872 additions and 102 deletions

View File

@@ -1,6 +1,20 @@
import type { IRestApiContext } from '@/Interface';
import { makeRestApiRequest } from '@/utils/apiUtils';
import type { InsightsSummary } from '@n8n/api-types';
import type { IRestApiContext } from '@/Interface';
import type {
InsightsSummary,
InsightsByTime,
InsightsByWorkflow,
ListInsightsWorkflowQueryDto,
} from '@n8n/api-types';
export const fetchInsightsSummary = async (context: IRestApiContext): Promise<InsightsSummary> =>
await makeRestApiRequest<InsightsSummary>(context, 'GET', '/insights/summary');
await makeRestApiRequest(context, 'GET', '/insights/summary');
export const fetchInsightsByTime = async (context: IRestApiContext): Promise<InsightsByTime[]> =>
await makeRestApiRequest(context, 'GET', '/insights/by-time');
export const fetchInsightsByWorkflow = async (
context: IRestApiContext,
filter?: ListInsightsWorkflowQueryDto,
): Promise<InsightsByWorkflow> =>
await makeRestApiRequest(context, 'GET', '/insights/by-workflow', filter);