How big the app's data is, and a webhook delivery log with Send again

Settings -> Data -> Storage measures the database, backups and sessions and every
table (size, rows, growth, how long it is kept, how far back it reaches), and flags
histories that are not being trimmed or have no limit.

Event webhooks now keep a delivery log (last 100 per webhook, 14 days): what was
sent, how it went, the message itself, and Send again, which resends it exactly as it
was (same id and signature). Resends are audited and in the Change log.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-21 20:58:57 +02:00
1 parent aebf3c6ce1
commit e114567d64
22 files changed
+6833 -19

No files matched your search

+7 -1
View File
@@ -8,6 +8,7 @@ import { readableError } from "../../utils/errors";
import { toast } from "../../utils/toast";
import ExportTableButton from "../../components/ExportTableButton";
import { EmptyRow, LoadingRow } from "../../components/EmptyState";
import WebhookDeliveries from "./WebhookDeliveries";
const EVENT_WORDS: Record<WebhookEventName, string> = {
"alert.opened": "A problem begins",
@@ -43,6 +44,7 @@ export default function ApiSettings() {
const [hookEvents, setHookEvents] = useState<Set<WebhookEventName>>(new Set(["alert.opened", "alert.resolved"]));
const [testResults, setTestResults] = useState<Record<number, string>>({});
const [busy, setBusy] = useState(false);
const [logOf, setLogOf] = useState<EventWebhook | null>(null);
function load() {
api.metricsTokens
@@ -239,7 +241,7 @@ export default function ApiSettings() {
<div className="card-body">
<p className="text-secondary">
A webhook is sent a JSON message when something happens, for Home Assistant, n8n or a status board. This is separate from the chat-style webhook under Notifications, which carries the sentence a person would read. A problem is announced on the same terms as a
notification — one under maintenance isn't until it ends. If you give a secret, each message carries <code>X-HLM-Signature: sha256=…</code>, an HMAC of the body, so the receiver can tell it came from here. A failed delivery is tried once more.
notification — one under maintenance isn't until it ends. If you give a secret, each message carries <code>X-HLM-Signature: sha256=…</code>, an HMAC of the body, so the receiver can tell it came from here. A failed delivery is tried once more, and what was sent and how it went is kept under <em>Sent</em> — where a message can be sent again exactly as it was.
</p>
{adding && (
<form className="border rounded p-3 mb-3" onSubmit={makeHook}>
@@ -336,6 +338,9 @@ export default function ApiSettings() {
<button className="btn btn-sm btn-outline-secondary" onClick={() => void testHook(h)}>
Test
</button>
<button className="btn btn-sm btn-outline-secondary" onClick={() => setLogOf(h)}>
Sent
</button>
<button className="btn btn-sm btn-outline-secondary" onClick={() => void toggleHook(h)}>
{h.enabled ? "Turn off" : "Turn on"}
</button>
@@ -355,6 +360,7 @@ export default function ApiSettings() {
</div>
</div>
</div>
{logOf && <WebhookDeliveries hook={logOf} onClose={() => setLogOf(null)} onChanged={load} />}
</>
);
}