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:
1 parent
aebf3c6ce1
commit
e114567d64
22 files changed
+6833
-19
No files matched your search
@@ -836,6 +836,51 @@ export interface EventWebhook {
|
||||
lastResult: string | null;
|
||||
}
|
||||
|
||||
/** One message sent to an event webhook, and how it went. */
|
||||
export interface WebhookDelivery {
|
||||
id: number;
|
||||
event: string;
|
||||
deliveryId: string;
|
||||
/** 1, or 2 when the first try failed. */
|
||||
attempts: number;
|
||||
ok: boolean;
|
||||
/** "200", or what went wrong. */
|
||||
result: string;
|
||||
/** The JSON that was sent; null when it was too large to keep. */
|
||||
body: string | null;
|
||||
retryable: boolean;
|
||||
/** The delivery this one sent again, if it was a retry by hand. */
|
||||
retryOf: number | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export type UsageState = "limit" | "filling" | "not_trimmed" | "unlimited" | "plain";
|
||||
|
||||
export interface TableUsage {
|
||||
name: string;
|
||||
rows: number;
|
||||
bytes: number | null;
|
||||
keepDays: number | null;
|
||||
note: string | null;
|
||||
oldest: string | null;
|
||||
newest: string | null;
|
||||
perDay: number | null;
|
||||
spanDays: number | null;
|
||||
state: UsageState;
|
||||
stateText: string;
|
||||
}
|
||||
|
||||
/** How big the app's own data is, and whether its histories are trimmed as they should be. */
|
||||
export interface DataUsage {
|
||||
generatedAt: string;
|
||||
database: { file: string; bytes: number; walBytes: number; pages: number; pageSize: number; freePages: number; freeBytes: number; tables: number };
|
||||
backups: { files: number; bytes: number };
|
||||
sessions: { files: number; bytes: number };
|
||||
totalBytes: number;
|
||||
tables: TableUsage[];
|
||||
attention: { table: string; text: string }[];
|
||||
}
|
||||
|
||||
export type CoverageStatus = "ok" | "stale" | "failed" | "none" | "unknown";
|
||||
|
||||
/** One Proxmox guest and how well it is backed up. */
|
||||
@@ -2393,6 +2438,11 @@ export const api = {
|
||||
setEnabled: (id: number, enabled: boolean) => request<{ webhook: EventWebhook }>(`/api/event-webhooks/${id}`, { method: "PATCH", body: JSON.stringify({ enabled }) }),
|
||||
remove: (id: number) => request<void>(`/api/event-webhooks/${id}`, { method: "DELETE" }),
|
||||
test: (id: number) => request<{ ok: boolean; result: string }>(`/api/event-webhooks/${id}/test`, { method: "POST" }),
|
||||
deliveries: (id: number) => request<{ deliveries: WebhookDelivery[] }>(`/api/event-webhooks/${id}/deliveries`),
|
||||
retryDelivery: (id: number, deliveryId: number) => request<{ ok: boolean; result: string }>(`/api/event-webhooks/${id}/deliveries/${deliveryId}/retry`, { method: "POST" }),
|
||||
},
|
||||
dataUsage: {
|
||||
get: () => request<DataUsage>("/api/data-usage"),
|
||||
},
|
||||
updateRuns: {
|
||||
list: (serverId?: number) => request<{ runs: UpdateRun[] }>(`/api/update-runs${serverId ? `?serverId=${serverId}` : ""}`),
|
||||
|
||||
Reference in new issue
Block a user