Add saved filter views, a customisable dashboard, server comparison, row keyboard navigation and share links
- Table search, status, tag and sort live in the address; Save view pins one as a favourite. - Dashboard cards can be moved and hidden per user (users.dashboard_layout, migration 0022). - Compare two to four servers' load, memory or disk on one chart. - j/k move through table rows that open a detail panel. - Share links open a read-only wall without signing in, numbers only or with names (share_links, migration 0023); the wall is split into a shared view over two data sources. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
906220040e
commit
44e393f172
50 files changed
+6114
-258
No files matched your search
@@ -20,6 +20,9 @@ export const users = sqliteTable("users", {
|
||||
favorites: text("favorites"),
|
||||
// When this person last pressed "Got it" on the dashboard summary of what changed; the next summary starts from here (ISO).
|
||||
lastLookedAt: text("last_looked_at"),
|
||||
// How this person arranged the dashboard: a JSON object with the cards they hid ("hidden": ["Gitea"]) and the order of the others
|
||||
// ("order": {"DNS": 0, "Secrets": 1}). Follows them to any browser; null is the default layout.
|
||||
dashboardLayout: text("dashboard_layout"),
|
||||
});
|
||||
|
||||
// ─── Audit log ──────────────────────────────────────────────────────────────
|
||||
@@ -480,3 +483,25 @@ export const alertTickets = sqliteTable(
|
||||
},
|
||||
(t) => [index("alert_tickets_key_idx").on(t.alertKey)],
|
||||
);
|
||||
|
||||
// ─── Share links: a read-only status board anyone with the address can open ─
|
||||
|
||||
export const shareLinkDetails = ["summary", "names"] as const;
|
||||
export type ShareLinkDetail = (typeof shareLinkDetails)[number];
|
||||
|
||||
// A link to the wall display that needs no sign-in, for a TV in the hall or someone who only wants to know if things are up. Only a hash
|
||||
// of the secret part of the address is kept (like an agent token), so it can't be read back out of the database or a backup.
|
||||
export const shareLinks = sqliteTable("share_links", {
|
||||
id: integer("id").primaryKey({ autoIncrement: true }),
|
||||
label: text("label").notNull(), // what it is for, e.g. "Hall TV"
|
||||
tokenHash: text("token_hash").notNull().unique(),
|
||||
tokenPrefix: text("token_prefix").notNull(), // the first characters, to tell links apart in the list
|
||||
// summary = how things are, in numbers; names = also the names of what is wrong, in maintenance, and the integrations
|
||||
detail: text("detail").$type<ShareLinkDetail>().notNull().default("summary"),
|
||||
createdBy: text("created_by"),
|
||||
createdAt: text("created_at")
|
||||
.notNull()
|
||||
.default(sql`(current_timestamp)`),
|
||||
expiresAt: text("expires_at"), // ISO; null = never
|
||||
lastUsedAt: text("last_used_at"), // ISO
|
||||
});
|
||||
Reference in new issue
Block a user