feat(webhook): time-series histogram stats endpoint + frontend chart
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user