fix: Update dashboard to match backend structure and support dark mode
Frontend changes:
- Updated API endpoints to call /tenants/{id}/dashboard/*
(removed /orchestrator/ prefix to match backend router)
- Updated DashboardPage to use CSS theme variables instead of hardcoded colors
- Replaced bg-white, text-gray-*, bg-blue-* with var(--bg-primary), var(--text-primary), etc.
- Quick action buttons now use color accents with left border for visual distinction
This ensures:
1. Frontend calls the correct backend endpoints (fixes 404 errors)
2. Dashboard respects theme (light/dark mode)
3. Consistent styling with rest of application
This commit is contained in:
@@ -153,7 +153,7 @@ export function useBakeryHealthStatus(tenantId: string) {
|
||||
queryKey: ['bakery-health-status', tenantId],
|
||||
queryFn: async () => {
|
||||
const response = await apiClient.get(
|
||||
`/orchestrator/tenants/${tenantId}/dashboard/health-status`
|
||||
`/tenants/${tenantId}/dashboard/health-status`
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
@@ -174,7 +174,7 @@ export function useOrchestrationSummary(tenantId: string, runId?: string) {
|
||||
queryFn: async () => {
|
||||
const params = runId ? { run_id: runId } : {};
|
||||
const response = await apiClient.get(
|
||||
`/orchestrator/tenants/${tenantId}/dashboard/orchestration-summary`,
|
||||
`/tenants/${tenantId}/dashboard/orchestration-summary`,
|
||||
{ params }
|
||||
);
|
||||
return response.data;
|
||||
@@ -195,7 +195,7 @@ export function useActionQueue(tenantId: string) {
|
||||
queryKey: ['action-queue', tenantId],
|
||||
queryFn: async () => {
|
||||
const response = await apiClient.get(
|
||||
`/orchestrator/tenants/${tenantId}/dashboard/action-queue`
|
||||
`/tenants/${tenantId}/dashboard/action-queue`
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
@@ -215,7 +215,7 @@ export function useProductionTimeline(tenantId: string) {
|
||||
queryKey: ['production-timeline', tenantId],
|
||||
queryFn: async () => {
|
||||
const response = await apiClient.get(
|
||||
`/orchestrator/tenants/${tenantId}/dashboard/production-timeline`
|
||||
`/tenants/${tenantId}/dashboard/production-timeline`
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
@@ -235,7 +235,7 @@ export function useInsights(tenantId: string) {
|
||||
queryKey: ['dashboard-insights', tenantId],
|
||||
queryFn: async () => {
|
||||
const response = await apiClient.get(
|
||||
`/orchestrator/tenants/${tenantId}/dashboard/insights`
|
||||
`/tenants/${tenantId}/dashboard/insights`
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user