Keep a history of integration figures and draw it on each integration's page
The numbers integrations report (queries and blocked share, queue and missing items, speeds, photos, documents, failed runs, firing rules, targets down, monthly cost and more) are kept about every quarter of an hour for five weeks, then as hours and days for up to two years, taken from each integration's stored reading. Every card on the 14 integration pages gets a Show the history button with a chart per figure, how it changed and its lowest and highest. A stretch when the integration could not be read is a gap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e4f3a54189
commit
e7f23ba13f
30 files changed
+10532
-1
No files matched your search
@@ -848,6 +848,20 @@ export interface AgentDiagnosticNote {
|
||||
detail: string | null;
|
||||
}
|
||||
|
||||
/** One figure an integration reports, over a stretch: where it stands, and what it was. */
|
||||
export interface IntegrationFigure {
|
||||
key: string;
|
||||
label: string;
|
||||
/** count, percent, ms, bytes, bytes_per_s or money:<currency>. */
|
||||
unit: string;
|
||||
latest: number;
|
||||
readAt: string;
|
||||
points: { t: string; v: number; lo?: number; hi?: number }[];
|
||||
first: number | null;
|
||||
low: number | null;
|
||||
high: number | null;
|
||||
}
|
||||
|
||||
export interface UpdateRun {
|
||||
id: number;
|
||||
serverId: number;
|
||||
@@ -4391,6 +4405,8 @@ export const api = {
|
||||
integration: { id: number; type: IntegrationType; name: string; enabled: boolean };
|
||||
config: Record<string, string | boolean>;
|
||||
}>(`/api/integrations/${id}/config`),
|
||||
/** How the figures it reports have moved over the last `days` (a day to a year); `kept` is false for a kind that keeps none. */
|
||||
figures: (id: number, days: number) => request<{ kept: boolean; days: number; figures: IntegrationFigure[] }>(`/api/integrations/${id}/figures?days=${days}`),
|
||||
inspect: (id: number) => request<IntegrationInspection>(`/api/integrations/${id}/inspect`, { method: "POST" }),
|
||||
/** Reads it now instead of at its next turn. A kind with a stored reading is read and judged again; a kind that is read live is asked whether it answers. */
|
||||
readNow: (id: number) => request<{ kind: "stored" | "live"; ok: boolean; error: string | null; at: string; latencyMs: number | null }>(`/api/integrations/${id}/read-now`, { method: "POST" }),
|
||||
|
||||
Reference in new issue
Block a user