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:
bobbanandClaude Sonnet 5.5 committed 2026-11-12 21:12:47 +01:00
1 parent e4f3a54189
commit e7f23ba13f
30 files changed
+10532 -1

No files matched your search

+2
View File
@@ -9,6 +9,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatAgo } from "../utils/duration";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ a }: { a: AdguardInstance }) {
if (!a.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -140,6 +141,7 @@ function Card({ a, canRead, onRead }: { a: AdguardInstance; canRead: boolean; on
)}
</>
)}
<FigureHistory integrationId={a.id} name={a.name} />
</div>
</div>
);
+2
View File
@@ -11,6 +11,7 @@ import { BlockSkeleton } from "../components/Skeleton";
import { ErrorNotice } from "../components/Notice";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ a }: { a: AuthentikInfo }) {
if (!a.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -131,6 +132,7 @@ function Card({ a }: { a: AuthentikInfo }) {
{s.lastConfigError && <div className="text-secondary small">Latest configuration error: {s.lastConfigError}</div>}
</>
)}
<FigureHistory integrationId={a.id} name={a.name} />
</div>
</div>
);
+2
View File
@@ -9,6 +9,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatBytes } from "./settings/StorageSettings";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
const KIND_NAMES: Record<DownloadClient["kind"], string> = { qbittorrent: "qBittorrent", sabnzbd: "SABnzbd" };
const SHOWN = 25;
@@ -234,6 +235,7 @@ function Card({ c, canRead, onRead }: { c: DownloadClient; canRead: boolean; onR
)}
</>
)}
<FigureHistory integrationId={c.id} name={c.name} />
</div>
</div>
);
+2
View File
@@ -8,6 +8,7 @@ import { BlockSkeleton } from "../components/Skeleton";
import { ErrorNotice } from "../components/Notice";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ g }: { g: GrafanaInstance }) {
if (!g.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -123,6 +124,7 @@ function Card({ g, canRead, onRead }: { g: GrafanaInstance; canRead: boolean; on
)}
</>
)}
<FigureHistory integrationId={g.id} name={g.name} />
</div>
</div>
);
+2
View File
@@ -9,6 +9,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatBytes } from "./settings/StorageSettings";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ p }: { p: HetznerProject }) {
if (!p.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -326,6 +327,7 @@ function Card({ p, canRead, onRead }: { p: HetznerProject; canRead: boolean; onR
)}
</>
)}
<FigureHistory integrationId={p.id} name={p.name} />
</div>
</div>
);
+2
View File
@@ -8,6 +8,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatBytes } from "./settings/StorageSettings";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ i }: { i: ImmichInfo }) {
if (!i.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -124,6 +125,7 @@ function Card({ i }: { i: ImmichInfo }) {
)}
</>
)}
<FigureHistory integrationId={i.id} name={i.name} />
</div>
</div>
);
+2
View File
@@ -10,6 +10,7 @@ import { ErrorNotice } from "../components/Notice";
import { useChartRange } from "../utils/chartRanges";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ j }: { j: JellyfinInfo }) {
if (!j.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -156,6 +157,7 @@ function Card({ j }: { j: JellyfinInfo }) {
</>
)}
{j.enabled && s && <History id={j.id} name={j.name} />}
<FigureHistory integrationId={j.id} name={j.name} />
</div>
</div>
);
+2
View File
@@ -9,6 +9,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatBytes } from "./settings/StorageSettings";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
const KIND_NAMES: Record<ArrApp["kind"], string> = { sonarr: "Sonarr", radarr: "Radarr", prowlarr: "Prowlarr", lidarr: "Lidarr", readarr: "Readarr" };
const QUEUE_SHOWN = 25;
@@ -193,6 +194,7 @@ function Card({ a, canRead, onRead }: { a: ArrApp; canRead: boolean; onRead: ()
)}
</>
)}
<FigureHistory integrationId={a.id} name={a.name} />
</div>
</div>
);
+2
View File
@@ -7,6 +7,7 @@ import { BlockSkeleton } from "../components/Skeleton";
import { ErrorNotice } from "../components/Notice";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ n }: { n: N8nInfo }) {
if (!n.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -84,6 +85,7 @@ function Card({ n }: { n: N8nInfo }) {
)}
</>
)}
<FigureHistory integrationId={n.id} name={n.name} />
</div>
</div>
);
+2
View File
@@ -7,6 +7,7 @@ import { BlockSkeleton } from "../components/Skeleton";
import { ErrorNotice } from "../components/Notice";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ n }: { n: NetBoxInfo }) {
if (!n.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -81,6 +82,7 @@ function Card({ n }: { n: NetBoxInfo }) {
)}
</>
)}
<FigureHistory integrationId={n.id} name={n.name} />
</div>
</div>
);
+2
View File
@@ -8,6 +8,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatBytes } from "./settings/StorageSettings";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ n }: { n: NextcloudInfo }) {
if (!n.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -111,6 +112,7 @@ function Card({ n }: { n: NextcloudInfo }) {
)}
</>
)}
<FigureHistory integrationId={n.id} name={n.name} />
</div>
</div>
);
+2
View File
@@ -8,6 +8,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatBytes } from "./settings/StorageSettings";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
const NAMES: Record<string, string> = { database: "Database", redis: "Redis", celery: "Document worker", index: "Search index", classifier: "Classifier", sanity_check: "Sanity check" };
@@ -125,6 +126,7 @@ function Card({ p }: { p: PaperlessInfo }) {
)}
</>
)}
<FigureHistory integrationId={p.id} name={p.name} />
</div>
</div>
);
+2
View File
@@ -7,6 +7,7 @@ import { BlockSkeleton } from "../components/Skeleton";
import { ErrorNotice } from "../components/Notice";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
/** Alerts every pipeline carries to prove it works: they are always firing, so they are not shown as firing. */
const BY_DESIGN = /^(watchdog|deadmansswitch|deadmanssnitch|infoinhibitor)$/i;
@@ -112,6 +113,7 @@ function Card({ p }: { p: PrometheusInfo }) {
)}
</>
)}
<FigureHistory integrationId={p.id} name={p.name} />
</div>
</div>
);
+2
View File
@@ -9,6 +9,7 @@ import { ErrorNotice } from "../components/Notice";
import { formatAgo } from "../utils/duration";
import { readableError } from "../utils/errors";
import PageIntro from "../components/PageIntro";
import FigureHistory from "../components/FigureHistory";
function Badge({ a }: { a: TechnitiumInstance }) {
if (!a.enabled) return <span className="badge bg-secondary-lt text-secondary">Off</span>;
@@ -289,6 +290,7 @@ function Card({ a, canRead, onRead }: { a: TechnitiumInstance; canRead: boolean;
</ul>
</>
)}
<FigureHistory integrationId={a.id} name={a.name} />
</div>
</div>
);