Disk fill forecasts, skeleton loaders, and a Silence button on alerts

A disk that is on course to be full within 14 days (setting: 0 turns it off) is
flagged on the Alerts page and dashboard, from the server's own history: needs
three days of steady growth, skips erratic disks and ones the ordinary disk
alert covers. Skeleton placeholders replace "Fetching status…" and "Loading…".
Alerts that a maintenance window can silence get a Silence button (1, 4 or 24
hours) that starts one, and the alert list is refreshed at once when a window
starts or ends.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-15 00:12:33 +02:00
1 parent 82974b98d0
commit f7f5e1cd41
24 files changed
+566 -25

No files matched your search

+10 -2
View File
@@ -11,6 +11,7 @@ import { formatAgo } from "../utils/duration";
import { readableError } from "../utils/errors";
import { ErrorNotice } from "../components/Notice";
import TableToolbar from "../components/TableToolbar";
import SilenceButton from "../components/SilenceButton";
const SEVERITY: Record<AlertSeverity, { label: string; badge: string; rank: number }> = {
critical: { label: "Critical", badge: "bg-red-lt text-red", rank: 0 },
@@ -32,7 +33,8 @@ const CATEGORY_LABELS: Record<AlertCategory, string> = {
type Row = AlertItem & { rank: number };
export default function Alerts(_props: { user: CurrentUser }) {
export default function Alerts({ user }: { user: CurrentUser }) {
const canSilence = user.role === "admin" || user.role === "operator";
const [report, setReport] = useState<AlertsReport | null>(null);
const [error, setError] = useState<string | null>(null);
const [loading, setLoading] = useState(false);
@@ -211,6 +213,7 @@ export default function Alerts(_props: { user: CurrentUser }) {
<SortableTh<Row> label="Kind" sortKeyName="category" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<Row> label="Source" sortKeyName="source" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
<SortableTh<Row> label="Alert" sortKeyName="message" activeKey={sortKey} direction={sortDir} onSort={requestSort} />
{canSilence && <th className="w-1"></th>}
</tr>
</thead>
<tbody>
@@ -243,11 +246,16 @@ export default function Alerts(_props: { user: CurrentUser }) {
);
})()}
</td>
{canSilence && (
<td className="text-nowrap">
<SilenceButton alert={a} onDone={() => void load(true)} />
</td>
)}
</tr>
))}
{(sorted ?? []).length === 0 && (
<tr>
<td colSpan={4} className="text-secondary text-center">
<td colSpan={canSilence ? 5 : 4} className="text-secondary text-center">
Nothing matches these filters.
</td>
</tr>
+6 -5
View File
@@ -15,6 +15,7 @@ import {
import { formatAgo } from "../utils/duration";
import StatusStrip from "../components/StatusStrip";
import { ErrorNotice } from "../components/Notice";
import { WidgetSkeleton } from "../components/Skeleton";
const DNS_TYPE_COLORS: Record<string, string> = {
A: "#60a5fa",
@@ -579,7 +580,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
>
<ErrorNotice error={dnsError} className="mb-2" />
{!dnsStats ? (
<div className="text-secondary">Fetching status…</div>
<WidgetSkeleton />
) : dnsStats.totalProviders === 0 ? (
<div className="text-secondary">
Configure a DNS provider from the <Link to="/dns">DNS</Link> page.
@@ -628,7 +629,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
}
>
{!secrets ? (
<div className="text-secondary">Fetching status…</div>
<WidgetSkeleton />
) : totalSecrets === 0 ? (
<div className="text-secondary">
Configure a secret from the <Link to="/secrets">Secrets</Link> page.
@@ -672,7 +673,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
>
<ErrorNotice error={serverError} className="mb-2" />
{!serverSummary ? (
!serverError && <div className="text-secondary">Fetching status…</div>
!serverError && <WidgetSkeleton />
) : serverSummary.total === 0 ? (
<div className="text-secondary">
Add a server from the <Link to="/servers">Servers</Link> page.
@@ -765,7 +766,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
>
<ErrorNotice error={domainError} className="mb-2" />
{!domainList ? (
!domainError && <div className="text-secondary">Fetching status…</div>
!domainError && <WidgetSkeleton />
) : domains.length === 0 ? (
<div className="text-secondary">
Domains for your DNS zones appear on the <Link to="/domains">Domains</Link> page after the next daily check, or add one there.
@@ -1081,7 +1082,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
) : (
<div className="text-secondary mt-2">
{integration ? (
"Fetching status…"
<WidgetSkeleton />
) : (
<>
Configure this integration from the <Link to="/integrations">Integrations</Link> page.
+2 -1
View File
@@ -21,6 +21,7 @@ import { guessAdminUrl, portOptionLabel } from "../utils/adminLinkUrl";
import { confirmDialog } from "../utils/dialogs";
import { ErrorNotice } from "../components/Notice";
import { useBreadcrumbTail } from "../utils/breadcrumb";
import { PageSkeleton } from "../components/Skeleton";
const SCHEDULE_TYPE_OPTIONS: { value: ScheduleType; label: string }[] = Object.entries(SCHEDULE_TYPE_LABELS).map(
([value, label]) => ({ value: value as ScheduleType, label }),
@@ -344,7 +345,7 @@ export default function ServerDetail({ user }: { user: CurrentUser }) {
}
}
if (loading) return <div className="text-secondary">Loading…</div>;
if (loading) return <PageSkeleton />;
if (error && !detail) return <div className="alert alert-danger">{error}</div>;
if (!detail) return null;
+2 -1
View File
@@ -1,6 +1,7 @@
import { useEffect, useState } from "react";
import { api } from "../../api/client";
import { ErrorNotice } from "../../components/Notice";
import { PageSkeleton } from "../../components/Skeleton";
const PROVIDER_NAMES: Record<string, string> = {
cloudflare: "Cloudflare",
@@ -92,7 +93,7 @@ export default function BadgeSettings() {
}
}
if (loading) return <div className="text-secondary">Loading…</div>;
if (loading) return <PageSkeleton />;
return (
<>
+2 -1
View File
@@ -3,6 +3,7 @@ import { api, type AppSettings, type DateFormat, type TimeFormat } from "../../a
import { setDateTimeSettings } from "../../utils/date";
import { setPageSize } from "../../utils/pageSize";
import { ErrorNotice } from "../../components/Notice";
import { PageSkeleton } from "../../components/Skeleton";
const DATE_FORMAT_OPTIONS: { value: DateFormat; label: string; example: string }[] = [
{ value: "ymd", label: "Year-Month-Day", example: "2026-09-15" },
@@ -53,7 +54,7 @@ export default function DisplaySettings() {
}
}
if (loading) return <div className="text-secondary">Loading…</div>;
if (loading) return <PageSkeleton />;
const dateExample = DATE_FORMAT_OPTIONS.find((o) => o.value === dateFormat)?.example ?? "";
+2 -1
View File
@@ -2,6 +2,7 @@ import { useEffect, useState } from "react";
import { api, type AppSettings } from "../../api/client";
import { confirmDialog } from "../../utils/dialogs";
import { ErrorNotice } from "../../components/Notice";
import { PageSkeleton } from "../../components/Skeleton";
const INTERVAL_OPTIONS: { value: number; label: string }[] = [
{ value: 1, label: "Every hour" },
@@ -67,7 +68,7 @@ export default function LogSettings() {
}
}
if (loading) return <div className="text-secondary">Loading…</div>;
if (loading) return <PageSkeleton />;
return (
<>
@@ -11,6 +11,7 @@ import {
type HealthCheckSettings,
} from "../../api/client";
import { ErrorNotice } from "../../components/Notice";
import { PageSkeleton } from "../../components/Skeleton";
const TIMEZONES = [
"UTC",
@@ -57,7 +58,7 @@ const DEFAULT_NOTIFICATIONS: NotificationEvents = {
integrationFailureThreshold: 3,
};
const DEFAULT_QUIET_HOURS: QuietHoursSettings = { enabled: false, start: "22:00", end: "07:00" };
const DEFAULT_HEALTH_CHECKS: HealthCheckSettings = { serverOfflineMinutes: 60, diskUsagePercent: 90, domainWarnDays: 30 };
const DEFAULT_HEALTH_CHECKS: HealthCheckSettings = { serverOfflineMinutes: 60, diskUsagePercent: 90, domainWarnDays: 30, diskForecastDays: 14 };
type TestResult = { ok: boolean; message: string } | null;
@@ -198,7 +199,7 @@ export default function NotificationSettings() {
}
}
if (loading) return <div className="text-secondary">Loading…</div>;
if (loading) return <PageSkeleton />;
return (
<>
@@ -598,6 +599,24 @@ export default function NotificationSettings() {
</div>
<div className="form-hint">Servers, Proxmox storage, Synology volumes. Checked every 15 min; a recovery notice follows.</div>
</div>
<div className="col-6">
<label className="form-label">Warn when a disk will fill within</label>
<div className="input-group">
<input
type="number"
className="form-control"
min={0}
max={90}
value={healthChecks.diskForecastDays}
onChange={(e) => setHealthChecks((h) => ({ ...h, diskForecastDays: Number(e.target.value) }))}
/>
<span className="input-group-text">days</span>
</div>
<div className="form-hint">
From each agent server's own history, shown on the Alerts page and dashboard (not sent as a notification). Needs a few days of
steady growth to say anything. 0 turns it off.
</div>
</div>
<div className="col-6">
<label className="form-label">Domain expiry warning</label>
<div className="input-group">