chore: regenerate OpenAPI types and remove type assertion hacks
Regenerated schema.d.ts from live backend — now includes slaCompliance on ExecutionStats/RouteMetrics, filterMatched/duplicateMessage on ProcessorNode, and all new dashboard endpoints (timeseries/by-app, timeseries/by-route, punchcard, errors/top, app-settings). Removed Record<string, unknown> casts that were working around the stale schema. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -142,7 +142,7 @@ function aggregateByApp(
|
||||
|
||||
// SLA compliance: weighted average of per-route slaCompliance from backend
|
||||
const appSettings = settingsMap.get(appId);
|
||||
const slaWeightedSum = routes.reduce((s, r) => s + ((r as Record<string, unknown>).slaCompliance as number ?? 100) * r.exchangeCount, 0);
|
||||
const slaWeightedSum = routes.reduce((s, r) => s + (r.slaCompliance ?? 100) * r.exchangeCount, 0);
|
||||
const slaCompliance = totalExchanges > 0 ? slaWeightedSum / totalExchanges : 100;
|
||||
|
||||
const errorCount = Math.round(totalFailed);
|
||||
@@ -316,7 +316,7 @@ export default function DashboardL1() {
|
||||
);
|
||||
|
||||
// Global SLA compliance from backend stats (exact calculation from executions table)
|
||||
const globalSlaCompliance = (stats as Record<string, unknown>)?.slaCompliance as number ?? -1;
|
||||
const globalSlaCompliance = stats?.slaCompliance ?? -1;
|
||||
const effectiveSlaCompliance = globalSlaCompliance >= 0 ? globalSlaCompliance : 100;
|
||||
|
||||
// Active error count = distinct error types
|
||||
|
||||
@@ -292,7 +292,7 @@ export default function DashboardL2() {
|
||||
successRate: m.successRate,
|
||||
avgDurationMs: m.avgDurationMs,
|
||||
p99DurationMs: m.p99DurationMs,
|
||||
slaCompliance: (m as Record<string, unknown>).slaCompliance as number ?? -1,
|
||||
slaCompliance: m.slaCompliance ?? -1,
|
||||
sparkline: m.sparkline ?? [],
|
||||
})),
|
||||
[metrics],
|
||||
|
||||
Reference in New Issue
Block a user