fix: auto-compute environment slug + respect environment filter globally
Part A: Environment creation slug is now auto-derived from display name and shown read-only (matching app creation pattern). Removes manual slug input. Part B: All data queries now pass the selected environment to backend: - Exchanges search, Dashboard L1/L2/L3 stats, Routes metrics, Route detail, correlation chains, and processor metrics all filter by selected environment. - Backend RouteMetricsController now accepts environment parameter for both route and processor metrics endpoints. Closes #XYZ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import type { Column } from '@cameleer/design-system'
|
||||
import {
|
||||
useSearchExecutions,
|
||||
} from '../../api/queries/executions'
|
||||
import { useEnvironmentStore } from '../../api/environment-store'
|
||||
import type { ExecutionSummary } from '../../api/types'
|
||||
import { attributeBadgeColor } from '../../utils/attribute-color'
|
||||
import { formatDuration, statusLabel } from '../../utils/format-utils'
|
||||
@@ -172,6 +173,7 @@ export default function Dashboard({ onExchangeSelect, activeExchangeId }: Dashbo
|
||||
if (activeExchangeId !== undefined) setSelectedId(activeExchangeId);
|
||||
}, [activeExchangeId]);
|
||||
|
||||
const selectedEnv = useEnvironmentStore((s) => s.environment);
|
||||
const { timeRange, statusFilters } = useGlobalFilters()
|
||||
const timeFrom = timeRange.start.toISOString()
|
||||
const timeTo = timeRange.end.toISOString()
|
||||
@@ -192,6 +194,7 @@ export default function Dashboard({ onExchangeSelect, activeExchangeId }: Dashbo
|
||||
timeTo,
|
||||
routeId: routeId || undefined,
|
||||
applicationId: appId || undefined,
|
||||
environment: selectedEnv,
|
||||
status: statusParam,
|
||||
text: textFilter,
|
||||
sortField,
|
||||
|
||||
Reference in New Issue
Block a user