overview: one endpoint, live projections and a response cache (m36)

This commit is contained in:
2026-08-27 17:48:20 +02:00
parent 7cdb74ec17
commit c8470724ce
40 changed files with 3298 additions and 2242 deletions
+32 -75
View File
@@ -29,6 +29,7 @@ import type {
LoginResponse,
LogoutResponse,
LookupResult,
Overview,
PauseState,
QueriesPage,
QueryDetail,
@@ -36,11 +37,6 @@ import type {
RuleEcho,
SettingsEnvelope,
SourceStatus,
StatsClients,
StatsRoutes,
StatsTimeseries,
StatsTotals,
StatsTypes,
Upstream,
UpstreamEcho,
Version,
@@ -588,39 +584,6 @@ export const sample_get_query_detail: QueryDetail = {
},
};
export const sample_get_stats: StatsTotals = {
avg_response_time_us: null,
blocked: 0,
clients: 0,
coverage: {
available_since: 0,
complete: true,
},
period: "1h",
queries: 0,
since: 0,
until: 0,
};
export const sample_get_stats_timeseries: StatsTimeseries = {
bucket_seconds: 0,
buckets: [
{
blocked: 0,
cached: 0,
queries: 0,
ts: 0,
},
],
coverage: {
available_since: 0,
complete: true,
},
period: "1h",
since: 0,
until: 0,
};
export const sample_get_pause: PauseState = {
paused: false,
until: null,
@@ -837,31 +800,35 @@ export const sample_error_not_found: ErrorEnvelope = {
error: "not found",
};
export const sample_get_stats_types: StatsTypes = {
coverage: {
available_since: 0,
complete: true,
},
period: "1h",
since: 0,
types: [
export const sample_get_overview: Overview = {
bucket_seconds: 0,
buckets: [
{
count: 0,
qtype: 0,
blocked: 0,
cached: 0,
queries: 0,
ts: 0,
},
],
clients: [
{
count: 0,
qtype: null,
buckets: [0],
client: "192.0.2.30",
},
{
buckets: [0],
client: "192.0.2.31",
},
{
buckets: [0],
client: "192.0.2.32",
},
],
until: 0,
};
export const sample_get_stats_routes: StatsRoutes = {
coverage: {
available_since: 0,
complete: true,
},
other: [0],
period: "1h",
routes: [
{
@@ -906,32 +873,22 @@ export const sample_get_stats_routes: StatsRoutes = {
},
],
since: 0,
until: 0,
};
export const sample_get_stats_clients: StatsClients = {
bucket_seconds: 0,
clients: [
totals: {
avg_response_time_us: 0,
blocked: 0,
clients: 0,
queries: 0,
},
types: [
{
buckets: [0],
client: "192.0.2.30",
count: 0,
qtype: 0,
},
{
buckets: [0],
client: "192.0.2.31",
},
{
buckets: [0],
client: "192.0.2.32",
count: 0,
qtype: null,
},
],
coverage: {
available_since: 0,
complete: true,
},
other: [0],
period: "1h",
since: 0,
until: 0,
};