feat(webhook): time-series histogram stats endpoint + frontend chart

This commit is contained in:
Александр Зимин
2026-05-12 14:30:22 +00:00
parent 91f4310a77
commit 5479142093
11 changed files with 1049 additions and 2 deletions
+6 -2
View File
@@ -37,6 +37,7 @@ import {
import type { WebhookTestPingResult } from '@/api/client'
import { SCOPE_DOT } from '@/lib/scope-style'
import { WebhookStatsCards } from '@/components/webhooks/WebhookStatsCards'
import { WebhookStatsHistogram } from '@/components/webhooks/WebhookStatsHistogram'
export const Route = createFileRoute('/webhooks/$id')({
component: WebhookDetailPage,
@@ -207,10 +208,13 @@ function WebhookDetailPage() {
</Panel>
{/* Stats cards — счётчики per status + success rate. Aggregate
из 4 параллельных queries с size=1 (cheap). Visual time-series
chart — deferred follow-up (требует /stats endpoint). */}
из 4 параллельных queries с size=1 (cheap). */}
<WebhookStatsCards subscriptionId={id} />
{/* Time-series histogram — backend /stats?bucketBy=hour|day. SVG
stacked bars без recharts depend'ы. 24h / 7d toggle. */}
<WebhookStatsHistogram subscriptionId={id} />
<div>
<div className="flex items-center justify-between mb-3">
<h2 className="font-sans text-title-md text-accent">