mirror of
https://github.com/anand34577/ferrum.git
synced 2026-09-18 16:45:16 +00:00
61ee806af6
- Default all queries to a 20s poll + refetch-on-focus (main.tsx) instead of a per-page opt-in, so every page/widget stays live without manual tuning. - New internal/notify package: Gotify and SMTP (stdlib net/smtp, STARTTLS and implicit-TLS-on-465) notifications, each independently optional. Fires from the alert evaluator on new alert triggers; admin-configurable from Settings with a send-test-notification action per channel. - OIDC/SSO moved from config.yaml-only to a DB-backed, admin-editable Settings card — swaps the live client with no restart. config.yaml is used to seed the database once on first boot after upgrading. - New Security settings: session TTL, login lockout policy, and a real "require 2FA for admins" enforcement (requireTOTPEnrolled middleware) that blocks non-enrolled admins from everything but /profile and logout. - New org-wide default preferences (theme/accent/look/landing page) for brand-new accounts, plus a personal landing-page picker and an email-me-alerts opt-in on Profile. - Storage page: separate Local vs Shared/External storage tables and capacity donuts, fixing shared-storage totals that were being summed once per node that mounts them (e.g. a 2TB NFS share on 4 nodes read as 8TB). - RankedBarChart: stop the longest bar's value label wrapping onto two lines (recharts auto-wraps LabelList when space is tight).
35 lines
1.4 KiB
SQL
35 lines
1.4 KiB
SQL
-- +goose Up
|
|
-- Single-row settings tables (id is always 1) — admin-editable via the
|
|
-- Settings UI, so OIDC/SSO and outbound notifications no longer require
|
|
-- editing config.yaml and restarting the process.
|
|
CREATE TABLE oidc_settings (
|
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
enabled INTEGER NOT NULL DEFAULT 0,
|
|
display_name TEXT NOT NULL DEFAULT '',
|
|
issuer_url TEXT NOT NULL DEFAULT '',
|
|
client_id TEXT NOT NULL DEFAULT '',
|
|
client_secret TEXT NOT NULL DEFAULT '', -- encrypted at rest (secrets.Box), same as connection credentials
|
|
redirect_url TEXT NOT NULL DEFAULT '',
|
|
updated_at TEXT NOT NULL
|
|
);
|
|
|
|
CREATE TABLE notification_settings (
|
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
gotify_enabled INTEGER NOT NULL DEFAULT 0,
|
|
gotify_url TEXT NOT NULL DEFAULT '',
|
|
gotify_token TEXT NOT NULL DEFAULT '', -- encrypted at rest
|
|
smtp_enabled INTEGER NOT NULL DEFAULT 0,
|
|
smtp_host TEXT NOT NULL DEFAULT '',
|
|
smtp_port INTEGER NOT NULL DEFAULT 587,
|
|
smtp_username TEXT NOT NULL DEFAULT '',
|
|
smtp_password TEXT NOT NULL DEFAULT '', -- encrypted at rest
|
|
smtp_from TEXT NOT NULL DEFAULT '',
|
|
smtp_to TEXT NOT NULL DEFAULT '', -- comma-separated recipients
|
|
smtp_use_tls INTEGER NOT NULL DEFAULT 1,
|
|
updated_at TEXT NOT NULL
|
|
);
|
|
|
|
-- +goose Down
|
|
DROP TABLE notification_settings;
|
|
DROP TABLE oidc_settings;
|