mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 11:25:06 +03:00
<img width="1835" height="886" alt="image" src="https://github.com/user-attachments/assets/c4ab5be6-cddc-49b3-8d09-169acb706a20" /> Adds total request and error rate columns to edge functions table behind a feature flag --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: SaxonF <1072756+SaxonF@users.noreply.github.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
19 lines
763 B
TypeScript
19 lines
763 B
TypeScript
export const normalizeFunctionIds = (functionIds: string[]): string[] =>
|
|
Array.from(new Set(functionIds)).sort()
|
|
|
|
export const edgeFunctionsKeys = {
|
|
list: (projectRef: string | undefined) => ['projects', projectRef, 'edge-functions'] as const,
|
|
lastHourStats: (projectRef: string | undefined, functionIds: string[] = []) =>
|
|
[
|
|
'projects',
|
|
projectRef,
|
|
'edge-functions',
|
|
'last-hour-stats',
|
|
normalizeFunctionIds(functionIds),
|
|
] as const,
|
|
detail: (projectRef: string | undefined, slug: string | undefined) =>
|
|
['projects', projectRef, 'edge-function', slug, 'detail'] as const,
|
|
body: (projectRef: string | undefined, slug: string | undefined) =>
|
|
['projects', projectRef, 'edge-function', slug, 'body'] as const,
|
|
}
|