AdGuard Home, Grafana, Docker image age, foldable server page cards
New integration kinds adguard (status, statistics, filter lists and a real DNS question over UDP; alerts for DNS down/not running, protection left off, stale lists) and grafana (alert rules firing or failing, data-source health). Optional warning for running Docker images built more than N days ago (off by default). A server's overview cards can be folded and arranged, kept per user. Migrations 0075-0077; docs, metrics and tests included. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3d9a2310bb
commit
551eb1597a
53 files changed
+27700
-33
No files matched your search
+65
-1
@@ -12,6 +12,8 @@ export interface CurrentUser {
|
||||
favorites?: string[];
|
||||
/** How this person arranged the dashboard cards. */
|
||||
dashboard?: DashboardLayout;
|
||||
/** How this person arranged a server's overview page. */
|
||||
serverPage?: PageLayout;
|
||||
}
|
||||
|
||||
export type ShareLinkDetail = "summary" | "names";
|
||||
@@ -101,6 +103,12 @@ export interface PublicWall {
|
||||
display: { dateFormat: string; timeFormat: string };
|
||||
}
|
||||
|
||||
/** How a person arranged a page of blocks: the ones they folded, and the order they put them in (a lower number comes first). */
|
||||
export interface PageLayout {
|
||||
folded: string[];
|
||||
order: Record<string, number>;
|
||||
}
|
||||
|
||||
/** The dashboard cards a person hid, and the order they put the rest in (a lower number comes first). */
|
||||
export interface DashboardLayout {
|
||||
hidden: string[];
|
||||
@@ -561,6 +569,8 @@ export interface HealthCheckSettings {
|
||||
vulnerabilityAlerts: boolean;
|
||||
/** A Docker host with at least this many high findings is a warning too; 0 = off. */
|
||||
vulnerabilityHighThreshold: number;
|
||||
/** A Docker host with running images built more than this many days ago is a warning; 0 = off. */
|
||||
imageAgeDays: number;
|
||||
/** Containers to leave alone: a name, or "host/name"; * stands for anything. */
|
||||
containerIgnore: string[];
|
||||
}
|
||||
@@ -1475,6 +1485,49 @@ export interface ArrApp {
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One AdGuard Home (an integration of type adguard), as its page shows it. */
|
||||
export interface AdguardInstance {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
url: string;
|
||||
status: { at: string; ok: boolean; error: string | null } | null;
|
||||
fresh: boolean;
|
||||
state: {
|
||||
version: string | null;
|
||||
running: boolean;
|
||||
protectionEnabled: boolean;
|
||||
protectionOffSince: string | null;
|
||||
dnsPort: number;
|
||||
stats: { queries: number; blocked: number; blockedPercent: number | null; avgMs: number | null; safeBrowsing: number; parental: number; safeSearch: number; periodHours: number | null; topBlocked: { name: string; count: number }[]; topClients: { name: string; count: number }[]; topQueried: { name: string; count: number }[] } | null;
|
||||
filters: { enabled: boolean; lists: { name: string; enabled: boolean; rules: number | null; updated: string | null }[] } | null;
|
||||
/** The real DNS question put to it. */
|
||||
probe: { ok: boolean; ms: number | null; error: string | null; name: string; host: string } | null;
|
||||
probeFailSince: string | null;
|
||||
updatedAt: string;
|
||||
staleLists: string[];
|
||||
} | null;
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
/** One Grafana (an integration of type grafana), as its page shows it. */
|
||||
export interface GrafanaInstance {
|
||||
id: number;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
url: string;
|
||||
status: { at: string; ok: boolean; error: string | null } | null;
|
||||
fresh: boolean;
|
||||
state: {
|
||||
version: string | null;
|
||||
/** The rules firing, pending or failing, and how many there are in all; null when they could not be read. */
|
||||
rules: { total: number; items: { name: string; uid: string | null; group: string; folder: string | null; state: string; health: string; lastError: string | null; severity: string | null; summary: string | null; activeAt: string | null }[] } | null;
|
||||
datasources: { uid: string; name: string; type: string; isDefault: boolean; ok: boolean | null; message: string | null }[] | null;
|
||||
updatedAt: string;
|
||||
} | null;
|
||||
problems: { key: string; message: string; severity: "warning" | "critical" }[];
|
||||
}
|
||||
|
||||
export type FragnetSignal = "start" | "stop" | "restart" | "kill";
|
||||
|
||||
export interface CostItem {
|
||||
@@ -2610,7 +2663,7 @@ export interface ManualTaskInput {
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
export type IntegrationType = "proxmox" | "synology" | "semaphore" | "tailscale" | "gitea" | "dockhand" | "uptimekuma" | "phpipam" | "pbs" | "osticket" | "unifi" | "npm" | "homeassistant" | "ups" | "jellyfin" | "authentik" | "prometheus" | "immich" | "paperless" | "nextcloud" | "netbox" | "n8n" | "hetzner" | "speedtest" | "fragnet" | "sonarr" | "radarr" | "prowlarr";
|
||||
export type IntegrationType = "proxmox" | "synology" | "semaphore" | "tailscale" | "gitea" | "dockhand" | "uptimekuma" | "phpipam" | "pbs" | "osticket" | "unifi" | "npm" | "homeassistant" | "ups" | "jellyfin" | "authentik" | "prometheus" | "immich" | "paperless" | "nextcloud" | "netbox" | "n8n" | "hetzner" | "speedtest" | "fragnet" | "sonarr" | "radarr" | "prowlarr" | "adguard" | "grafana";
|
||||
|
||||
export interface IntegrationField {
|
||||
key: string;
|
||||
@@ -2834,6 +2887,8 @@ export interface DockhandVulnerabilityEnvironment {
|
||||
totalImages: number | null;
|
||||
/** The critical findings (at most 100). */
|
||||
findings: DockhandVulnFinding[];
|
||||
/** The images its running containers use by age; null when they were never read. `over` is how many are older than the setting (null while it is off). */
|
||||
images: { at: string | null; running: number; undated: number; over: number | null; oldest: { image: string; ageDays: number; containers: string[] }[] } | null;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
@@ -2842,6 +2897,8 @@ export interface DockhandVulnerabilitiesResponse {
|
||||
alerts: boolean;
|
||||
/** A host with at least this many high findings is alerted too; 0 = never. */
|
||||
highThreshold: number;
|
||||
/** Running images older than this many days are alerted; 0 = off. */
|
||||
imageAgeDays: number;
|
||||
status: { at: string; ok: boolean; error: string | null } | null;
|
||||
fresh: boolean;
|
||||
environments: DockhandVulnerabilityEnvironment[];
|
||||
@@ -3155,6 +3212,7 @@ async function request<T>(path: string, init?: RequestInit): Promise<T> {
|
||||
export const api = {
|
||||
me: Object.assign(() => request<{ user: CurrentUser }>("/api/me"), {
|
||||
setFavorites: (paths: string[]) => request<{ favorites: string[] }>("/api/me/favorites", { method: "PUT", body: JSON.stringify({ paths }) }),
|
||||
setServerPage: (layout: PageLayout) => request<{ serverPage: PageLayout }>("/api/me/server-page", { method: "PUT", body: JSON.stringify(layout) }),
|
||||
setDashboard: (layout: DashboardLayout) => request<{ dashboard: DashboardLayout }>("/api/me/dashboard", { method: "PUT", body: JSON.stringify(layout) }),
|
||||
changes: () => request<ChangesSummary>("/api/me/changes"),
|
||||
markChangesSeen: () => request<{ lastLookedAt: string }>("/api/me/changes/seen", { method: "POST" }),
|
||||
@@ -3207,6 +3265,12 @@ export const api = {
|
||||
list: () => request<{ speedtests: SpeedtestInfo[] }>("/api/speedtest"),
|
||||
history: (id: number, days: number) => request<SpeedtestHistory>(`/api/speedtest/${id}/history?days=${days}`),
|
||||
},
|
||||
adguard: {
|
||||
list: () => request<{ instances: AdguardInstance[] }>("/api/adguard"),
|
||||
},
|
||||
grafana: {
|
||||
list: () => request<{ instances: GrafanaInstance[] }>("/api/grafana"),
|
||||
},
|
||||
arr: {
|
||||
list: () => request<{ apps: ArrApp[] }>("/api/arr"),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user