Settings down to eight tabs; Domains become a tab of DNS

Notifications gains Alert tickets, Display gains Badge colours, and a new Data tab holds Backup,
Logs and Cache. Domains is the 'Domain names' tab of DNS. Old addresses redirect; the docs, the
Privacy page and the links from alerts and the agenda name the new places.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-19 22:36:24 +02:00
1 parent 1432b148e9
commit ddd0aa622a
23 files changed
+153 -65

No files matched your search

+7 -7
View File
@@ -4,7 +4,7 @@ Everything Homelab Manager knows is in **one SQLite file**, plus a handful of se
`.env`. A backup is those two things — and the part people get wrong is keeping them **apart**
(see [Keeping backups safe](#keeping-backups-safe)).
- [The built-in backups (Settings → Backup)](#the-built-in-backups-settings--backup)
- [The built-in backups (Settings → Data → Backup)](#the-built-in-backups-settings--data--backup)
- [What to back up](#what-to-back-up)
- [Taking a backup](#taking-a-backup)
- [Checking a backup](#checking-a-backup)
@@ -12,19 +12,19 @@ Everything Homelab Manager knows is in **one SQLite file**, plus a handful of se
- [Keeping backups safe](#keeping-backups-safe)
- [Automating it](#automating-it)
- [Restoring](#restoring)
- [The encrypted export in Settings → Backup](#the-encrypted-export-in-settings--backup)
- [The encrypted export in Settings → Data → Backup](#the-encrypted-export-in-settings--data--backup)
- [If there is no backup](#if-there-is-no-backup)
- [What has been tested, and what hasn't](#what-has-been-tested-and-what-hasnt)
The commands assume the standard Docker setup from the README: you run them in the folder that
holds `docker-compose.yml`, `.env` and `data/`, and the service is called `homelab-manager`.
## The built-in backups (Settings → Backup)
## The built-in backups (Settings → Data → Backup)
You don't need the snippets below for the everyday case: Homelab Manager takes a backup of its own
database **every day** (03:30 in the notification time zone, the newest 14 kept — both changeable, and it
can be switched off), checks each one as it makes it, and keeps them in `data/backups/` with the same
names the snippets use. **Settings → Backup** shows them and does the rest:
names the snippets use. **Settings → Data → Backup** shows them and does the rest:
- **Back up now** makes one on the spot. **Download** takes a copy to your computer (the quickest way
off the machine). **Check** opens a backup and says whether SQLite finds it sound, how many users,
@@ -268,9 +268,9 @@ everything stored so far unreadable.
not show the gap, so it is worth noting it somewhere.
- Everyone has to sign in again if you restored without `data/sessions/`. That is expected.
## The encrypted export in Settings → Backup
## The encrypted export in Settings → Data → Backup
A different tool, for a different job. **Settings → Backup** downloads one file, encrypted with a
A different tool, for a different job. **Settings → Data → Backup** downloads one file, encrypted with a
passphrase you choose (AES-256-GCM, key derived with scrypt), holding:
- the settings (notification channels, display, log retention, alert tickets, and so on),
@@ -292,7 +292,7 @@ Keep the passphrase somewhere safe; it can't be recovered.
What you can get back, from least to most work:
- **You have a Settings → Backup export:** a fresh install plus an import restores the settings,
- **You have a Settings → Data → Backup export:** a fresh install plus an import restores the settings,
integrations and DNS providers. Everything else is re-created.
- **You only have the `.env`:** a fresh install with the same file works, and everything in the
database starts empty. Sign in (the first account becomes admin), re-add the integrations,
+2 -2
View File
@@ -817,7 +817,7 @@ that were never changed aren't stored; the app fills in defaults when reading.
| `display` | `dateFormat`, `timeFormat`, `pageSize`. |
| `providerColors`, `integrationColors` | Badge colours, by provider / integration type. |
| `consistency` | `excludedRanges` — addresses the Consistency and IP Addresses pages ignore. Default `["172.16.0.0/12"]` (Docker's networks). |
| `alertTickets` | Opening osTicket tickets for alerts: `enabled`, `integrationId`, `severities`, `categories`, `requesterName`/`requesterEmail`, `topicId`, `priorityId`, `notifyStaff`, `existingProblems`, `confirmChecks`, `summaryAbove`, `reopenAfterMinutes`. Edited under Settings → Alert tickets. The API address and key are on the osTicket integration, not here. |
| `alertTickets` | Opening osTicket tickets for alerts: `enabled`, `integrationId`, `severities`, `categories`, `requesterName`/`requesterEmail`, `topicId`, `priorityId`, `notifyStaff`, `existingProblems`, `confirmChecks`, `summaryAbove`, `reopenAfterMinutes`. Edited under Settings → Notifications → Alert tickets. The API address and key are on the osTicket integration, not here. |
| `nameGenerator` | `themes` — the Generator's server-name lists: `[{ "id", "label", "names": [...], "lastImport"? }]`. Edited under Settings → Names. |
Rows whose key starts with **`_internal:`** are scheduler bookkeeping, not
@@ -907,7 +907,7 @@ dates, the audit log — is readable by anyone who can read the file, so treat t
file and its backups as sensitive anyway.
**Backups.**
- **Settings → Backup** exports the settings, the integrations and the DNS
- **Settings → Data → Backup** exports the settings, the integrations and the DNS
providers (with their credentials decrypted, then wrapped in a file encrypted
with a passphrase you choose). Importing merges the settings over the current ones, and adds
integrations and providers that don't exist yet (matched by type and name) — it never
+2 -2
View File
@@ -182,7 +182,7 @@ the dashboard views themselves load fine.
a field looks wrong, tell us what happened and we'll adjust — this one has had less real-world exposure than
every other integration listed here.
**Optional: opening tickets for alerts** (Settings → Alert tickets)
**Optional: opening tickets for alerts** (Settings → Notifications → Alert tickets)
- **Config fields:** Ticket API address (optional), Ticket API key (optional, stored encrypted like the database
password), Allow self-signed certificate (ticket API). Leave them empty and the integration works as before.
@@ -191,7 +191,7 @@ the dashboard views themselves load fine.
app's requests come from (behind Docker or a reverse proxy that is the host's or proxy's address, not the
container's — check osTicket's log if it refuses) and tick **Can create tickets**. osTicket refuses a key from any
other address, which is the most common reason a test ticket fails.
- **What is sent:** one ticket per problem — name and email you set under Settings → Alert tickets, a subject, the
- **What is sent:** one ticket per problem — name and email you set under Settings → Notifications → Alert tickets, a subject, the
problem's text and a link back to this app, optionally a help topic and priority id — with `autorespond` off (the
"user" is this app, so an acknowledgement would only bounce) and osTicket's own staff alert on or off as you choose.
- **What it can't do:** close, reopen, or comment on a ticket — osTicket's API has no such endpoint. A ticket opened
+1 -1
View File
@@ -191,7 +191,7 @@ It runs the checks live when opened (a recent result is reused for a minute), an
## Tickets in osTicket
Not a notification, but it acts on the same alerts: with **Settings → Alert tickets** switched on (off by default), a problem on the Alerts page opens a
Not a notification, but it acts on the same alerts: with **Settings → Notifications → Alert tickets** switched on (off by default), a problem on the Alerts page opens a
ticket in osTicket. It runs every 15 minutes, starting about a minute and a half after the app starts.
| Rule | What it means |
+3 -3
View File
@@ -282,7 +282,7 @@ can be ignored with a reason, and stays ignored. The excluded-ranges list is the
same one the IP Addresses page manages — edit it from either page and both
reflect the change.
**Domains** — when each domain registration expires, read from the registry
**Domains** (Network → DNS → *Domain names*) — when each domain registration expires, read from the registry
itself. The domains behind your DNS zones are picked up automatically (a zone
like `lab.example.se` resolves to the `example.se` registration that actually
expires); others can be added by hand. Each is looked up daily over RDAP where
@@ -337,7 +337,7 @@ It checks live (a recent result is reused for a minute; "Check now" forces a
fresh one), and anything it couldn't read is called out at the top rather than
quietly treated as fine.
**Alert tickets** (Settings → Alert tickets, admin only) opens a ticket in osTicket for an alert, through osTicket's own API. Every 15 minutes the
**Alert tickets** (Settings → Notifications → Alert tickets, admin only) opens a ticket in osTicket for an alert, through osTicket's own API. Every 15 minutes the
problems on the Alerts page are looked at, and one that is new and has lasted two checks in a row gets one ticket — never a second for the same problem,
and never one for something under a maintenance window or about osTicket itself. You choose which severities and kinds count (critical and warning by
default), and the Alerts page shows the ticket number on each alert that has one. If many problems appear at once — a network drop that makes thirty
@@ -518,7 +518,7 @@ resolved after it has been missing for a couple of minutes in a row — thirty w
never in the first minutes after the app starts, when server alerts are held back on purpose. Resolved
incidents are kept for 400 days. The weekly digest has an *Incidents* section.
**Database backups** (Settings → Backup). A copy of Homelab Manager's own database is taken every day (03:30
**Database backups** (Settings → Data → Backup). A copy of Homelab Manager's own database is taken every day (03:30
in the notification time zone, the newest 14 kept; on unless you turn it off), checked as it is made, and
kept in `data/backups/`. The page lists them with **Download**, **Check**, **Restore…** and **Delete**,
makes one now (**Back up now**), takes one from somewhere else (**Upload a backup…**) and sets the schedule.
+2 -2
View File
@@ -92,7 +92,7 @@ even further, to admin only:
- **Alert tickets**: everyone sees which alerts have an osTicket ticket (a
badge on the Alerts page, linking to the ticket in osTicket); switching the
feature on, choosing what opens a ticket, and sending a test ticket are
under Settings → Alert tickets, which is admin-only.
under Settings → Notifications → Alert tickets, which is admin-only.
- **Runbooks**: everyone reads them (on a server's page, an integration's card,
next to an alert); writing, editing and removing one needs operator.
- **Inventory**: everyone can see the hardware (and print its labels); adding, editing and removing needs
@@ -109,7 +109,7 @@ even further, to admin only:
- **Acknowledging an alert, handing it over, and taking it back** need operator (the person it is handed to must be an operator or
administrator); everyone sees who has what. **Incidents** (Alerts → History) are readable by everyone signed in; writing a note needs operator, and a note
can be removed by its author or an administrator.
- **Database backups** (Settings → Backup: making, downloading, uploading, checking, restoring and deleting them, and the schedule) are
- **Database backups** (Settings → Data → Backup: making, downloading, uploading, checking, restoring and deleting them, and the schedule) are
administrator-only: a backup holds the audit log, every server's address, the hashed agent tokens and all the stored credentials
(encrypted).
- **Alert limits** on a server's page: everyone can see the ones a server has of its own; only an administrator changes them. The same goes for the **services to
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* Finishes a restore that was staged from Settings → Backup. It has to happen before the database is opened, which is why it is a module
* Finishes a restore that was staged from Settings → Data → Backup. It has to happen before the database is opened, which is why it is a module
* of its own that index.ts imports first: by the time anything else loads, the file is already the one that was chosen.
*
* Nothing is deleted. The database that was in use is moved into the backups folder (as "…-pre-restore.sqlite") before the chosen one is put
+1 -1
View File
@@ -1,5 +1,5 @@
import "./loadEnv.js";
// Before anything opens the database: puts a restore that was staged from Settings → Backup in place.
// Before anything opens the database: puts a restore that was staged from Settings → Data → Backup in place.
import "./db/applyRestore.js";
import { env, warnIfAuthNotConfigured, checkSessionSecret } from "./env.js";
import { createApp } from "./app.js";
+1 -1
View File
@@ -85,7 +85,7 @@ export const INTEGRATION_FIELDS: Partial<Record<IntegrationType, IntegrationFiel
optional: true,
placeholder: "ost_ (osTicket's default, unless changed at install)",
},
// Only for opening tickets from alerts (Settings → Alert tickets). The rest of this integration reads the database and never writes.
// Only for opening tickets from alerts (Settings → Notifications → Alert tickets). The rest of this integration reads the database and never writes.
{
key: "apiUrl",
label: "Ticket API address (optional)",
+1 -1
View File
@@ -192,7 +192,7 @@ export function agendaFromData(data: AgendaData, now: Date, tz: string, days: nu
const certificate = s.type === "ssl_certificate";
day(`secret:${s.id}`, certificate ? "certificate" : "secret", s.expiryDate, (past) => ({ title: `${certificate ? "Certificate" : "Secret"} “${s.name}” ${past ? "expired" : "expires"}`, detail: certificate ? "kept as a secret" : null, link: "/secrets" }));
}
for (const d of data.domains) day(`domain:${d.id}`, "domain", d.expiresAt, (past) => ({ title: `Domain ${d.name} ${past ? "expired" : "expires"}`, link: "/domains" }));
for (const d of data.domains) day(`domain:${d.id}`, "domain", d.expiresAt, (past) => ({ title: `Domain ${d.name} ${past ? "expired" : "expires"}`, link: "/dns?view=domains" }));
for (const e of data.endpoints) {
if (!e.enabled || !e.certExpiresAt) continue;
day(`endpoint-cert:${e.id}`, "certificate", e.certExpiresAt.slice(0, 10), (past) => ({ title: `The certificate for ${e.name} ${past ? "expired" : "expires"}`, detail: "seen by an endpoint check", link: "/endpoints", serverId: e.serverId }));
+1 -1
View File
@@ -359,7 +359,7 @@ export async function sendTestTicket(actor: CurrentUser): Promise<CreatedTicket>
topicId: settings.topicId,
priorityId: settings.priorityId,
subject: "[Homelab] Test ticket from Homelab Manager",
message: `This is a test. ${actor.name ?? actor.email ?? "An administrator"} asked Homelab Manager to open it from Settings → Alert tickets, to check that tickets can be created here.\n\nNothing is wrong. You can close this ticket.\n\n${absolute("/settings/alert-tickets")}`,
message: `This is a test. ${actor.name ?? actor.email ?? "An administrator"} asked Homelab Manager to open it from Settings → Notifications → Alert tickets, to check that tickets can be created here.\n\nNothing is wrong. You can close this ticket.\n\n${absolute("/settings/alert-tickets")}`,
});
await recordAudit({ actor, category: "alert_ticket", action: "test", targetType: "integration", targetId: settings.integrationId ?? undefined, detail: { ticket: created.number } });
return created;
+2 -2
View File
@@ -59,12 +59,12 @@ const SOURCES: Record<string, { label: string; link: string }> = {
gitea: { label: "Gitea", link: "/gitea" },
dockhand: { label: "Docker", link: "/docker" },
tailscale: { label: "Tailscale", link: "/tailscale" },
homelab: { label: "Homelab Manager", link: "/settings/backup" },
homelab: { label: "Homelab Manager", link: "/settings/data" },
pbs: { label: "Proxmox Backup", link: "/pbs" },
uptimekuma: { label: "Uptime Kuma", link: "/uptime-kuma" },
osticket: { label: "osTicket", link: "/osticket" },
secrets: { label: "Secrets", link: "/secrets" },
domains: { label: "Domains", link: "/domains" },
domains: { label: "Domains", link: "/dns?view=domains" },
endpoint: { label: "Endpoint", link: "/endpoints" },
heartbeat: { label: "Heartbeat", link: "/heartbeats" },
};
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* Backups of Homelab Manager itself. Everything it knows is one SQLite file, so a backup is a consistent copy of that file (`VACUUM INTO`,
* which is safe while the app is working) kept in the data folder's `backups/`: taken every day, the newest few kept, each one checked as
* it is made, and downloadable, uploadable and restorable from Settings → Backup.
* it is made, and downloadable, uploadable and restorable from Settings → Data → Backup.
*
* What a backup is not: it does not hold `CREDENTIALS_ENCRYPTION_KEY`, which decrypts the credentials stored in it, and it isn't off the
* machine until someone copies it there. Both are said where backups are shown.
+1 -1
View File
@@ -180,7 +180,7 @@ export interface NameGeneratorSettings {
export type AlertTicketSeverity = "critical" | "warning" | "info";
/** Opening an osTicket ticket for an alert. Off until an admin sets it up under Settings → Alert tickets. */
/** Opening an osTicket ticket for an alert. Off until an admin sets it up under Settings → Notifications → Alert tickets. */
export interface AlertTicketSettings {
enabled: boolean;
/** The osTicket integration whose API (address and key) is used. */
+1 -1
View File
@@ -420,7 +420,7 @@ describe("how current the backups are, in the alerts and /metrics", () => {
assert.equal(stale!.severity, "warning");
assert.match(stale!.message, /60 h old/);
assert.equal(stale!.source, "Homelab Manager");
assert.equal(stale!.link, "/settings/backup");
assert.equal(stale!.link, "/settings/data");
await oneAged(24 * 8);
assert.equal((await selfAlert())!.severity, "critical");
assert.match((await selfAlert())!.message, /8 days old/);
+12 -17
View File
@@ -35,19 +35,12 @@ import Heartbeats from "./pages/Heartbeats";
import ComingUp from "./pages/ComingUp";
import ChangeLog from "./pages/ChangeLog";
import Backups from "./pages/Backups";
import Domains from "./pages/Domains";
import Consistency from "./pages/Consistency";
import Privacy from "./pages/Privacy";
import Settings from "./pages/Settings";
import NotificationSettings from "./pages/settings/NotificationSettings";
import BadgeSettings from "./pages/settings/BadgeSettings";
import DisplaySettings from "./pages/settings/DisplaySettings";
import { DataGroup, DisplayGroup, NotificationsGroup } from "./pages/settings/SettingsGroups";
import TagSettings from "./pages/settings/TagSettings";
import CacheSettings from "./pages/settings/CacheSettings";
import LogSettings from "./pages/settings/LogSettings";
import BackupSettings from "./pages/settings/BackupSettings";
import NameSettings from "./pages/settings/NameSettings";
import AlertTicketSettings from "./pages/settings/AlertTicketSettings";
import ShareSettings from "./pages/settings/ShareSettings";
import SignInSettings from "./pages/settings/SignInSettings";
import ApiSettings from "./pages/settings/ApiSettings";
@@ -151,7 +144,7 @@ function Shelled({ user }: { user: CurrentUser }) {
<Route path="/generator" element={<Generator user={user} />} />
<Route path="/privacy" element={<Privacy />} />
<Route path="/consistency" element={<Consistency user={user} />} />
<Route path="/domains" element={<Domains user={user} />} />
<Route path="/domains" element={<Navigate to="/dns?view=domains" replace />} />
<Route path="/maintenance" element={<Maintenance user={user} />} />
<Route path="/updates" element={<Updates user={user} />} />
<Route path="/inventory" element={<Inventory user={user} />} />
@@ -199,18 +192,20 @@ function Shelled({ user }: { user: CurrentUser }) {
}
>
<Route index element={<Navigate to="notifications" replace />} />
<Route path="notifications" element={<NotificationSettings />} />
<Route path="badges" element={<BadgeSettings />} />
<Route path="notifications" element={<NotificationsGroup />} />
<Route path="sign-in" element={<SignInSettings />} />
<Route path="display" element={<DisplaySettings />} />
<Route path="tags" element={<TagSettings />} />
<Route path="display" element={<DisplayGroup />} />
<Route path="names" element={<NameSettings />} />
<Route path="alert-tickets" element={<AlertTicketSettings />} />
<Route path="tags" element={<TagSettings />} />
<Route path="share" element={<ShareSettings />} />
<Route path="api" element={<ApiSettings />} />
<Route path="cache" element={<CacheSettings />} />
<Route path="logs" element={<LogSettings />} />
<Route path="backup" element={<BackupSettings />} />
<Route path="data" element={<DataGroup />} />
{/* Tabs that were gathered into others: old links and bookmarks still arrive. */}
<Route path="badges" element={<Navigate to="/settings/display?view=badges" replace />} />
<Route path="alert-tickets" element={<Navigate to="/settings/notifications?view=tickets" replace />} />
<Route path="backup" element={<Navigate to="/settings/data" replace />} />
<Route path="logs" element={<Navigate to="/settings/data?view=logs" replace />} />
<Route path="cache" element={<Navigate to="/settings/data?view=cache" replace />} />
</Route>
</Routes>
<DialogHost />
-2
View File
@@ -16,7 +16,6 @@ import {
IconSettings,
IconWand,
IconTool,
IconWorldWww,
IconListCheck,
IconRefresh,
IconDownload,
@@ -92,7 +91,6 @@ export const NAV: NavEntry[] = [
icon: <IconWorld size={20} />,
items: [
{ to: "/dns", label: "DNS", icon: <IconWorld size={20} /> },
{ to: "/domains", label: "Domains", icon: <IconWorldWww size={20} /> },
{ to: "/ipam", label: "IP Addresses", icon: <IconNetwork size={20} /> },
{ to: "/ports", label: "Ports", icon: <IconPlug size={20} /> },
{ to: "/consistency", label: "Consistency", icon: <IconListCheck size={20} /> },
+6 -6
View File
@@ -648,7 +648,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
if (serverSummary?.total === 0) notSetUp.push({ label: "Servers", to: "/servers", what: "add a server and install its agent" });
if (heartbeatList !== null && heartbeatList.length === 0) notSetUp.push({ label: "Heartbeats", to: "/heartbeats", what: "have a backup or cron job report in, so you hear when it doesn't run" });
if (endpointChecks !== null && endpointChecks.length === 0) notSetUp.push({ label: "Endpoints", to: "/endpoints", what: "ask a web address, a port or a certificate whether it is fine" });
if (domainList !== null && domains.length === 0) notSetUp.push({ label: "Domains", to: "/domains", what: "appear after a DNS zone is added and the daily check has run" });
if (domainList !== null && domains.length === 0) notSetUp.push({ label: "Domains", to: "/dns?view=domains", what: "appear after a DNS zone is added and the daily check has run" });
if (integrations !== null) {
for (const { type, label } of WIDGETS) {
if (!integrations.some((i) => i.type === type)) notSetUp.push({ label, to: "/integrations", what: "connect it under Integrations" });
@@ -904,13 +904,13 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
!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.
Domains for your DNS zones appear on the <Link to="/dns?view=domains">Domains</Link> page after the next daily check, or add one there.
</div>
) : (
<>
<div className="row g-2 mb-3">
<div className="col-4">
<MiniStat label="Tracked" value={<Link to="/domains" className="text-reset text-decoration-none">{domains.length}</Link>} />
<MiniStat label="Tracked" value={<Link to="/dns?view=domains" className="text-reset text-decoration-none">{domains.length}</Link>} />
</div>
<div className="col-4">
<MiniStat label="Expiring" value={expiringDomains.length} accent={expiringDomains.length > 0 ? "#f59e0b" : undefined} />
@@ -935,7 +935,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
{expiredDomains.slice(0, 3).map((d, i) => (
<span key={d.id}>
{i > 0 && ", "}
<Link to="/domains">{d.name}</Link> <span className="text-secondary">({Math.abs(d.daysLeft ?? 0)} d ago)</span>
<Link to="/dns?view=domains">{d.name}</Link> <span className="text-secondary">({Math.abs(d.daysLeft ?? 0)} d ago)</span>
</span>
))}
{expiredDomains.length > 3 && <span className="text-secondary"> +{expiredDomains.length - 3} more</span>}
@@ -951,7 +951,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
.map((d, i) => (
<span key={d.id}>
{i > 0 && ", "}
<Link to="/domains">{d.name}</Link> <span className="text-secondary">({d.daysLeft} d)</span>
<Link to="/dns?view=domains">{d.name}</Link> <span className="text-secondary">({d.daysLeft} d)</span>
</span>
))}
{expiringDomains.length > 3 && <span className="text-secondary"> +{expiringDomains.length - 3} more</span>}
@@ -964,7 +964,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
)}
{failingDomainChecks > 0 && (
<div className="text-secondary small mt-2">
{failingDomainChecks} domain{failingDomainChecks === 1 ? "" : "s"} couldn't be refreshed — see the <Link to="/domains">Domains</Link> page.
{failingDomainChecks} domain{failingDomainChecks === 1 ? "" : "s"} couldn't be refreshed — see the <Link to="/dns?view=domains">Domains</Link> page.
</div>
)}
</>
+31 -1
View File
@@ -1,4 +1,6 @@
import { useEffect, useState, type CSSProperties } from "react";
import { useEffect, useState, type CSSProperties, type ReactNode } from "react";
import ViewTabs from "../components/ViewTabs";
import DomainsView from "../views/DomainsView";
import TimeAgo from "../components/TimeAgo";
import { useSearchParams } from "react-router-dom";
import {
@@ -39,7 +41,34 @@ function providerBadgeStyle(colors: Record<string, string>, providerType: DnsPro
return { backgroundColor: `${color}22`, color, border: `1px solid ${color}55` };
}
const dnsTabs = (view: "records" | "domains") => (
<ViewTabs
label="DNS view"
tabs={[
{ to: "/dns", label: "Zones and records", active: view === "records" },
{ to: "/dns?view=domains", label: "Domain names", active: view === "domains" },
]}
/>
);
/** Zones and records from the DNS providers, and the registration expiry of the domain names (`?view=domains`). */
export default function Dns({ user }: { user: CurrentUser }) {
const [params] = useSearchParams();
if (params.get("view") === "domains") {
return (
<>
<div className="d-flex align-items-center mb-2">
<h2 className="page-title mb-0">DNS</h2>
</div>
{dnsTabs("domains")}
<DomainsView user={user} />
</>
);
}
return <DnsRecords user={user} tabs={dnsTabs("records")} />;
}
function DnsRecords({ user, tabs }: { user: CurrentUser; tabs: ReactNode }) {
const isAdmin = user.role === "admin";
const canEdit = user.role === "admin" || user.role === "operator";
@@ -277,6 +306,7 @@ export default function Dns({ user }: { user: CurrentUser }) {
</button>
)}
</div>
{tabs}
<ErrorNotice error={error} />
{managingProviders ? (
+4 -4
View File
@@ -172,7 +172,7 @@ export default function Privacy() {
<td>
{retention?.enabled
? `Entries older than ${retention.retentionDays} days are deleted (checked every ${retention.intervalHours} h).`
: "Indefinitely — automatic deletion is off (Settings → Logs)."}{" "}
: "Indefinitely — automatic deletion is off (Settings → Data → Logs)."}{" "}
The name stays in old entries even if the account is removed.
</td>
</tr>
@@ -202,7 +202,7 @@ export default function Privacy() {
API tokens and passwords — including the Gotify/ntfy tokens, SMTP password and webhook secret — encrypted (AES-256-GCM) with a key held in
the server's environment, not in the database. (If that key isn't set, notification credentials are kept unencrypted and the server says so at startup.)
</td>
<td>Until deleted. Settings → Backup exports include them, encrypted with a passphrase you choose.</td>
<td>Until deleted. Settings → Data → Backup exports include them, encrypted with a passphrase you choose.</td>
</tr>
<tr>
<td>Inventory</td>
@@ -229,7 +229,7 @@ export default function Privacy() {
you configured, to read status and, when someone with permission asks, to act (start a VM, run a template…).
</li>
<li className="mb-2">
<strong>osTicket tickets</strong> — only if an admin has switched on Settings → Alert tickets: for a problem that has lasted, the text of the alert
<strong>osTicket tickets</strong> — only if an admin has switched on Settings → Notifications → Alert tickets: for a problem that has lasted, the text of the alert
(which server or integration, what is wrong), a link back to this app, and the requester name and email set there go to your osTicket's API.
</li>
<li className="mb-2">
@@ -337,7 +337,7 @@ export default function Privacy() {
<strong>Sign out</strong> to end your session now. Administrators can also end anyone's on the <Link to="/users?view=sessions">Users → Signed in now</Link> page.
</li>
<li className="mb-2">
<strong>Audit and diagnostic logs</strong> can be deleted automatically after a set number of days under Settings → Logs
<strong>Audit and diagnostic logs</strong> can be deleted automatically after a set number of days under Settings → Data → Logs
{retention ? ` — currently ${retention.enabled ? `on, ${retention.retentionDays} days` : "off"}` : ""}.
</li>
<li className="mb-2">
+2 -6
View File
@@ -3,17 +3,13 @@ import { NavLink, Outlet } from "react-router-dom";
const SUB_NAV = [
{ to: "/settings/notifications", label: "Notifications" },
{ to: "/settings/badges", label: "Badges" },
{ to: "/settings/sign-in", label: "Sign-in" },
{ to: "/settings/display", label: "Display" },
{ to: "/settings/tags", label: "Tags" },
{ to: "/settings/alert-tickets", label: "Alert tickets" },
{ to: "/settings/names", label: "Names" },
{ to: "/settings/tags", label: "Tags" },
{ to: "/settings/share", label: "Share links" },
{ to: "/settings/api", label: "API and webhooks" },
{ to: "/settings/cache", label: "Cache" },
{ to: "/settings/logs", label: "Logs" },
{ to: "/settings/backup", label: "Backup" },
{ to: "/settings/data", label: "Data" },
];
export default function Settings() {
+68
View File
@@ -0,0 +1,68 @@
import { useSearchParams } from "react-router-dom";
import ViewTabs from "../../components/ViewTabs";
import NotificationSettings from "./NotificationSettings";
import AlertTicketSettings from "./AlertTicketSettings";
import DisplaySettings from "./DisplaySettings";
import BadgeSettings from "./BadgeSettings";
import BackupSettings from "./BackupSettings";
import LogSettings from "./LogSettings";
import CacheSettings from "./CacheSettings";
// Settings used to have twelve tabs of its own. Three of them gather the ones that belong together; each part is the same page it always was,
// switched by `?view=` (so it can be linked to, and the old addresses redirect here).
/** Notifications, and — beside it — opening an osTicket ticket for an alert. */
export function NotificationsGroup() {
const [params] = useSearchParams();
const view = params.get("view") === "tickets" ? "tickets" : "notifications";
return (
<>
<ViewTabs
label="Notification settings"
tabs={[
{ to: "/settings/notifications", label: "Notifications", active: view === "notifications" },
{ to: "/settings/notifications?view=tickets", label: "Alert tickets", active: view === "tickets" },
]}
/>
{view === "tickets" ? <AlertTicketSettings /> : <NotificationSettings />}
</>
);
}
/** How things look: dates, times and table sizes, and the colours of the badges. */
export function DisplayGroup() {
const [params] = useSearchParams();
const view = params.get("view") === "badges" ? "badges" : "display";
return (
<>
<ViewTabs
label="Display settings"
tabs={[
{ to: "/settings/display", label: "Dates, times and tables", active: view === "display" },
{ to: "/settings/display?view=badges", label: "Badge colours", active: view === "badges" },
]}
/>
{view === "badges" ? <BadgeSettings /> : <DisplaySettings />}
</>
);
}
/** The upkeep of the app's own data: its backups, how long its logs are kept, and the DNS record cache. */
export function DataGroup() {
const [params] = useSearchParams();
const asked = params.get("view");
const view = asked === "logs" || asked === "cache" ? asked : "backup";
return (
<>
<ViewTabs
label="Data settings"
tabs={[
{ to: "/settings/data", label: "Backup", active: view === "backup" },
{ to: "/settings/data?view=logs", label: "Logs", active: view === "logs" },
{ to: "/settings/data?view=cache", label: "Cache", active: view === "cache" },
]}
/>
{view === "logs" ? <LogSettings /> : view === "cache" ? <CacheSettings /> : <BackupSettings />}
</>
);
}
@@ -27,7 +27,8 @@ function statusBadge(d: DomainRecord) {
}
}
export default function Domains({ user }: { user: CurrentUser }) {
/** When each domain registration expires — the "Domain names" side of the DNS page. */
export default function DomainsView({ user }: { user: CurrentUser }) {
const canEdit = user.role === "admin" || user.role === "operator";
const [data, setData] = useState<DomainList | null>(null);
const [error, setError] = useState<string | null>(null);
@@ -124,7 +125,7 @@ export default function Domains({ user }: { user: CurrentUser }) {
return (
<>
<div className="d-flex align-items-center mb-3">
<h2 className="page-title mb-0">Domains</h2>
<h3 className="mb-0">Domain names</h3>
{canEdit && (
<button className="btn btn-outline-secondary ms-auto" onClick={refreshAll} disabled={refreshingAll}>
{refreshingAll ? "Checking…" : "Check all now"}