Add Params declaration UI (ticket 034)

New Params panel (Log viewer / Params / Metrics / Dashboards) declares a
bare param via POST /api/params, mirroring Metrics' declare-then-list
pattern including inline 400 error surfacing. Lifted the params list from
LogPreview's own effect into App.tsx so declaring a param there updates
the Columns picker immediately, without a page reload.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
Hugh Kaznowski
2026-09-05 16:43:53 +01:00
co-authored by Claude Sonnet 5
parent 41c9a3660b
commit dd1a0a234d
6 changed files with 147 additions and 68 deletions
+4
View File
@@ -273,6 +273,10 @@ export function fetchParamDeclarations(): Promise<ParamDeclaration[]> {
return getJson('/api/params')
}
export function declareParam(request: ParamDeclaration): Promise<ParamDeclaration> {
return postJson('/api/params', request)
}
export function fetchMetricDeclarations(): Promise<MetricDeclaration[]> {
return getJson('/api/metrics')
}