Files
cameleer-server/ui
hsiegeln fcb53dd010 fix!: require environment on diagram lookup and attribute keys queries
Closes two cross-env data leakage paths. Both endpoints previously
returned data aggregated across all environments, so a diagram or
attribute key from dev could appear in a prod UI query (and vice versa).

B1: GET /api/v1/diagrams?application=&routeId= now requires
?environment= and resolves agents via
registryService.findByApplicationAndEnvironment instead of
findByApplication. Prevents serving a dev diagram for a prod route.

B2: GET /api/v1/search/attributes/keys now requires ?environment=.
SearchIndex.distinctAttributeKeys gains an environment parameter and
the ClickHouse query adds the env filter alongside the existing
tenant_id filter. Prevents prod attribute names leaking into dev
autocompletion (and vice versa).

SPA hooks updated to thread environment through from
useEnvironmentStore; query keys include environment so React Query
re-fetches on env switch. No call-site changes needed — hook
signatures unchanged.

B3 (AgentMetricsController env scope) deferred to P3C: agent-env is
effectively 1:1 today via the instance_id naming
({envSlug}-{appSlug}-{replicaIndex}), and the URL migration in P3C
to /api/v1/environments/{env}/agents/{agentId}/metrics naturally
introduces env from path. A minimal P1 fix would regress the "view
metrics of a killed agent" case.

BREAKING CHANGE: Both endpoints now require ?environment= (slug).
Clients omitting the parameter receive 400.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 23:19:55 +02:00
..
2026-04-15 15:28:42 +02:00
2026-04-15 15:28:42 +02:00
2026-04-15 15:28:42 +02:00
2026-04-15 15:28:42 +02:00

Cameleer UI

React SPA built with @cameleer/design-system v0.1.28, TanStack Query, and Zustand.

Development

npm install
npm run dev

By default the dev server proxies /api/* to http://localhost:8081. To proxy to a remote server instead:

VITE_API_TARGET=http://192.168.50.86:30081 npm run dev

No CORS issues — Vite's proxy makes API calls server-side.

Build

npm run build

API Types

Regenerate TypeScript types from a running backend:

npm run generate-api   # Requires backend running on :8081

Key Features

  • Composable sidebar with accordion behavior (Applications / Starred / Admin sections)
  • Context-aware cmd-k search: shows apps/routes/exchanges on operational pages, users/groups/roles on admin pages
  • LIVE mode toggle: when ON, queries poll at intervals (5s-30s); when OFF, sidebar clicks trigger manual refresh
  • Route control bar with state-aware buttons (start/stop/suspend/resume) and confirmation dialogs
  • Event-type icons in agent timeline with severity-based coloring