From 8f3aca7e1d579b133e19f724219dac5be95cc98f Mon Sep 17 00:00:00 2001 From: nfebe Date: Fri, 17 Jul 2026 18:58:57 +0100 Subject: [PATCH] refactor(ui): Remove the unused dashboards API client The dashboard endpoints ship as backend storage with no UI builder, a deliberate choice, but the frontend still carried a typed client and panel types for them that nothing imported. Their presence implied a dashboard UI existed. Removing them leaves the backend API untouched; a real client can be added alongside the UI if one is ever built. --- src/services/api.ts | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/services/api.ts b/src/services/api.ts index be4204a..fb17f3e 100755 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -689,29 +689,6 @@ export interface REDPoint { p95_time_ms: number; } -export interface DashboardPanel { - id?: string; - title: string; - source: "container" | "serving"; - series: string; - deployment?: string; - type: "line" | "stat"; - width: number; -} - -export interface Dashboard { - id?: string; - name: string; - panels: DashboardPanel[]; -} - -export const dashboardsApi = { - list: () => apiClient.get<{ dashboards: Dashboard[] }>("/dashboards"), - get: (id: string) => apiClient.get(`/dashboards/${id}`), - save: (dashboard: Dashboard) => apiClient.post("/dashboards", dashboard), - remove: (id: string) => apiClient.delete(`/dashboards/${id}`), -}; - export const servingApi = { series: (deploymentName: string, since = "1h") => apiClient.get<{ deployment: string; since: string; points: REDPoint[] }>(`/deployments/${deploymentName}/serving`, {