diff --git a/README.md b/README.md index d8fb4c8..367365f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ The optional **Foresight** module extends the platform with long-range capacity - `node_` — Pin a VM to a specific node (e.g. `node_241` pins to the node whose IP ends in `.241`) - `anti_` — Prevent two VMs from sharing the same node (e.g. `anti_dc02` on `dc01`) - **Clusters configured in the tool** — Register one or more HyperCore clusters from the dashboard, in a folder of the tenant tree (Settings → Access → Tenants), by an installation, MSP or customer admin. Credentials are stored encrypted in PostgreSQL; nothing cluster-specific lives in `.env`. Every view, setting and Foresight analysis is per cluster, and the same physical cluster registered twice is detected and only balanced once. -- **Tenants, roles and access** — Clusters live in folders under customers and MSPs, shown in the sidebar rail (collapsible, colour-coded, searchable by folder, cluster name or address). Access is a role on a place: the installation, an MSP, a customer, a folder, a cluster, the VMs with a tag, or one VM. Five built-in roles (Admin, Engineer, App Manager, Backup Manager, Viewer) can be copied into your own; groups, invitations by mail, an audit log, and one-time guest console access for someone outside. Nobody hands out rights they do not hold. +- **Tenants, roles and access** — Clusters live in folders under customers and MSPs, shown in the cluster switcher in the top bar (collapsible, colour-coded, searchable by folder, cluster name or address). Access is a role on a place: the installation, an MSP, a customer, a folder, a cluster, the VMs with a tag, or one VM. Five built-in roles (Admin, Engineer, App Manager, Backup Manager, Viewer) can be copied into your own; groups, invitations by mail, an audit log, and one-time guest console access for someone outside. Nobody hands out rights they do not hold. - **VM management and console** — Edit a VM's settings and power state, create VMs (also from a cloud image with cloud-init), take snapshots and clones, now or at a scheduled time, with the change history kept. Open a VM's console in the browser through HCM (no HyperCore session handed out), with every session logged. An optional check takes console screenshots and warns when a console was left logged in. - **Cluster alerts** — HyperCore's own conditions (failed drive, node low on memory), terminated updates, open console sessions and backup problems as badges on the cluster card, with mute and history. - **Live Configuration** — All tunable settings are stored in a shared PostgreSQL database. Change any parameter through the dashboard UI at runtime — no container restarts required. @@ -72,7 +72,7 @@ The optional **Foresight** module extends the platform with long-range capacity └───────▲──────────┘ └───────────────────────▲────────────────────────┘ │ │ ┌───────┴──────────────────────────────────────┴────────────────────────┐ - │ Dashboard (port 5000): cluster rail with folders, Infraviewer, │ + │ Dashboard (port 5000): cluster switcher with folders, Infraviewer, │ │ Clusterbalancer, Foresight, Backup, Settings, in-app updater │ └───────────────────────────────────────────────────────────────────────┘ ``` @@ -87,7 +87,7 @@ so clusters can be added, disabled or removed independently. | **Balancer** | Decision engine — affinity, reactive, and predictive modes | | **InfluxDB** | Time-series metrics storage with 1-year detailed + 5-year long-term retention | | **PostgreSQL** | Config store and Foresight conclusions database | -| **Dashboard** | Web UI: cluster rail, monitoring, live configuration, access and tenants, VM management, Foresight, Backup, mail | +| **Dashboard** | Web UI: cluster switcher, monitoring, live configuration, access and tenants, VM management, Foresight, Backup, mail | | **Sentinel** | Foresight capacity analysis, forecasting, and REST API | | **Backup** | Backup scheduler and REST API: schedules, plans, restore points, restores, verification, test restores, imports, proxy deployment | | **Console** | VM console relay for the browser, open-session check and boot checks (screen recognition) | @@ -261,9 +261,9 @@ Affinity rules take priority over all other engines. A VM with a `node_` tag wil ## Dashboard -The dashboard is a single-page application served on port 5000. The UI is available in **English, Dutch, French, and German** — pick from the language selector in the header. The currently running version is shown in a small footer at the bottom-right of every page. +The dashboard is a single-page application served on port 5000. The UI is available in **English, Dutch, French, and German** — pick from the language selector in the top bar. The currently running version is shown in a small footer at the bottom-right of every page. -The left-hand **cluster rail** lists folders and clusters (collapsible, colour-coded, with a search box that matches folder names, cluster names and addresses). The selected cluster drives every tab; breadcrumbs in the header show where you are. Pages show state; adding or changing something opens a dialog. What a user sees depends on their roles: a panel or button they may not use is not shown, and the server checks every call anyway. +The **cluster switcher** in the top bar opens the list of folders and clusters (collapsible, colour-coded, with a search box that matches folder names, cluster names and addresses); its button also counts alerts on your other clusters. The selected cluster drives every tab; breadcrumbs under the top bar show where you are. The dashboard follows the system's light or dark setting, and **☾ Dark / ☀ Light** in the top bar overrides it. Pages show state; adding or changing something opens a dialog. What a user sees depends on their roles: a panel or button they may not use is not shown, and the server checks every call anyway. | Area | Contents | |------|----------| @@ -291,7 +291,7 @@ Screenshots were taken on a three-node lab cluster; the [user manual](docs/manua Access is given as roles on places in the tenant tree (Settings → Access): an MSP admin manages their customers, a customer admin their folders, a Backup Manager restores without editing VMs, a -Viewer only looks. Folder menus in the rail (the "⋯" button) move clusters between folders, open the +Viewer only looks. Folder menus in the cluster list (the "⋯" button) move clusters between folders, open the folder's access and assign a backup target. See [docs/administration.md](docs/administration.md) for the full walkthrough. @@ -340,7 +340,7 @@ available as a plan mode. - **Targets (admin).** Settings → Targets holds the share URIs (`smb://nas.local/share/path` or `nfs://nas.local/export/path`) and their credentials, stored encrypted. A target is assigned to a - folder from the folder's menu in the rail: one target for everyone, or one per tenant, as you + folder from the folder's menu in the cluster list: one target for everyone, or one per tenant, as you prefer. Users never see a path or a password; a location is shown as `Target / Folder / vm`. - **Schedules.** Back up many VMs of a folder on one timetable: daily, weekly, monthly, hourly or any RRULE, with blackout periods and real or synthetic fulls on chosen days. Each VM's duration is learned @@ -352,7 +352,7 @@ available as a plan mode. copies from the cluster's own folder. The tenant folder is created over SMB when missing; HyperCore creates the VM folder itself. Spaces in folder names become underscores on the share. Clusters without a folder use `no_folder` and the target flagged as default for them (the "No - folder" group in the rail has the same Backup target menu). + folder" group in the cluster list has the same Backup target menu). - **Retention.** After a successful run, older copies of that VM beyond the retention count are deleted, oldest first. SMB targets are pruned over the protocol with the stored credentials; for NFS, bind-mount the share into the `backup` container and set the prune path on the target. diff --git a/VERSION b/VERSION index 10c0880..27f9cd3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.4 +1.8.0 diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile index 34c499d..9c6d048 100644 --- a/dashboard/Dockerfile +++ b/dashboard/Dockerfile @@ -51,7 +51,7 @@ COPY docs/administration.md manual/extra/ RUN mkdir -p static/vendor && \ curl -sL "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js" -o static/vendor/chart.umd.min.js && \ curl -sL "https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns@3.0.0/dist/chartjs-adapter-date-fns.bundle.min.js" -o static/vendor/chartjs-adapter-date-fns.bundle.min.js && \ - curl -sL "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" -o static/vendor/fonts.css && \ + curl -sL "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap" -o static/vendor/fonts.css && \ # Download the actual font files referenced in the CSS grep -oP 'url\(\K[^)]+' static/vendor/fonts.css | while read url; do \ FILENAME=$(echo "$url" | sed 's/.*\///;s/?.*//' ); \ diff --git a/dashboard/app.py b/dashboard/app.py index 910fb6e..9c0a432 100644 --- a/dashboard/app.py +++ b/dashboard/app.py @@ -77,6 +77,22 @@ app.config['SOCK_SERVER_OPTIONS'] = {'ping_interval': 25, 'max_message_size': None} sock = Sock(app) + +@app.template_global() +def theme_inline(): + """theme.css and theme.js written into the page, for pages a guest opens: only /guest/ is published to + outsiders, so those pages cannot load /static/. Read once per process.""" + cached = getattr(theme_inline, '_cached', None) + if cached is None: + from markupsafe import Markup + base = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static') + with open(os.path.join(base, 'theme.css'), encoding='utf-8') as f: + css = f.read() + with open(os.path.join(base, 'theme.js'), encoding='utf-8') as f: + js = f.read() + cached = theme_inline._cached = Markup(f'\n') + return cached + # seed tunables DB from env vars on first run (no-op if already seeded) config_db.seed_from_env() diff --git a/dashboard/manual.py b/dashboard/manual.py index 7648c53..4a3ee37 100644 --- a/dashboard/manual.py +++ b/dashboard/manual.py @@ -77,32 +77,38 @@ def page(title: str, body_html: str, nav: list[dict], current: str, version: str return f''' {html.escape(title)} · HyperCore Manager manual + + + +
HyperCore Manager · manual
← back to the dashboard{f'{html.escape(version)}' if version else ''}
{body_html}
diff --git a/dashboard/static/access.css b/dashboard/static/access.css index 7fb1bdd..a0ba220 100644 --- a/dashboard/static/access.css +++ b/dashboard/static/access.css @@ -7,7 +7,7 @@ .hcm-modal-foot .hcm-btn-danger { margin-right: auto; } .hcm-text { line-height: 1.55; color: var(--text-secondary); margin: 0 0 8px; } .hcm-form { display: flex; flex-direction: column; gap: 10px; } -.hcm-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-muted); letter-spacing: .02em; } +.hcm-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); letter-spacing: .02em; } .hcm-field .um-input, .hcm-field .um-select { width: 100%; box-sizing: border-box; } .hcm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 640px) { .hcm-grid2 { grid-template-columns: 1fr; } } @@ -17,39 +17,39 @@ font-size: 12px; cursor: pointer; color: var(--text-secondary); } .hcm-chip:has(input:checked) { border-color: var(--accent-cyan); color: var(--text-primary); } .hcm-banner { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 8px 0 12px; border-radius: 8px; - background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .35); color: var(--accent-amber); font-size: 12px; } + background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--accent-amber); font-size: 12px; } .hcm-banner .um-action-btn { margin-left: auto; } -.um-badge.hcm-badge-warn { background: rgba(245, 158, 11, .14); color: var(--accent-amber); border-color: rgba(245, 158, 11, .4); } -.um-badge.hcm-badge-off { background: rgba(148, 163, 184, .12); color: var(--text-muted); border-color: var(--border); } +.um-badge.hcm-badge-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--accent-amber); border-color: color-mix(in srgb, var(--warn) 40%, transparent); } +.um-badge.hcm-badge-off { background: color-mix(in srgb, var(--ink-3) 12%, transparent); color: var(--text-muted); border-color: var(--border); } .hcm-permgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; } .hcm-permarea { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--bg-card); } .hcm-perm { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; color: var(--text-secondary); cursor: pointer; } .hcm-perm.na { opacity: .45; cursor: not-allowed; } .hcm-perm span:nth-of-type(1) { flex: 1; } -.hcm-level { font-family: 'JetBrains Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); +.hcm-level { font-family: var(--font-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; } .hcm-tree { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; } .hcm-tree-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; } .hcm-tree-row:last-child { border-bottom: none; } .hcm-tree-row:hover { background: var(--bg-card-hover); } -.hcm-tree-level { font-family: 'JetBrains Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-cyan); +.hcm-tree-level { font-family: var(--font-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-cyan); min-width: 64px; } .hcm-tree-name { color: var(--text-primary); font-weight: 500; } .hcm-who-line { font-size: 12px; padding: 3px 0; color: var(--text-secondary); } -.rail-tenant { font-family: 'JetBrains Mono', monospace; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); +.rail-tenant { font-family: var(--font-ui); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); padding: 10px 10px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.hcm-guest-link { font-family: 'JetBrains Mono', monospace; font-size: 12px; word-break: break-all; padding: 8px 10px; border-radius: 6px; +.hcm-guest-link { font-family: var(--font-mono); font-size: 12px; word-break: break-all; padding: 8px 10px; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); } -.hcm-guest-code { font-family: 'JetBrains Mono', monospace; font-size: 28px; letter-spacing: .3em; color: var(--accent-cyan); text-align: center; padding: 10px; } +.hcm-guest-code { font-family: var(--font-mono); font-size: 28px; letter-spacing: .3em; color: var(--accent-cyan); text-align: center; padding: 10px; } /* Settings → Access → Tenants: a column browser with a preview pane */ .hcm-tb { display: flex; border: 1px solid var(--border); border-radius: 8px; height: min(62vh, 600px); min-height: 360px; overflow: hidden; background: var(--bg-card); } .hcm-tb-cols { display: flex; flex: 0 1 auto; min-width: 0; overflow-x: auto; } .hcm-tb-col { flex: 0 0 210px; display: flex; flex-direction: column; border-right: 1px solid var(--border); overflow-y: auto; padding: 4px 0; } .hcm-tb-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 0 4px; border-radius: 6px; font-size: 13px; color: var(--text-primary); cursor: pointer; user-select: none; } .hcm-tb-item:hover { background: var(--bg-card-hover); } -.hcm-tb-item.sel { background: rgba(6, 182, 212, .16); box-shadow: inset 0 0 0 1px rgba(6, 182, 212, .35); } +.hcm-tb-item.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); } .hcm-tb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.hcm-tb-count { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; } +.hcm-tb-count { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; } .hcm-tb-chev { color: var(--text-muted); font-size: 15px; line-height: 1; } .hcm-tb-empty, .hcm-tb-hint { font-size: 12px; color: var(--text-muted); padding: 8px 12px; } .hcm-tb-add { margin: 6px 8px; padding: 5px 8px; border: 1px dashed var(--border); border-radius: 6px; background: none; color: var(--text-muted); font-size: 12px; cursor: pointer; text-align: left; } @@ -57,13 +57,13 @@ .hcm-tb-icon { flex: 0 0 auto; width: 16px; height: 16px; display: inline-flex; } .hcm-tb-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .hcm-tb-icon-msp { color: var(--accent-purple); } .hcm-tb-icon-customer { color: var(--accent-amber); } -.hcm-tb-icon-folder { color: var(--accent-cyan); } .hcm-tb-icon-cluster { color: var(--accent-green, #22c55e); } +.hcm-tb-icon-folder { color: var(--accent-cyan); } .hcm-tb-icon-cluster { color: var(--ok); } .hcm-tb-icon-user, .hcm-tb-icon-group { color: var(--text-muted); } .hcm-tb-pane { flex: 1 1 420px; min-width: 420px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; } .hcm-tb-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); } .hcm-tb-head > .hcm-tb-icon { width: 28px; height: 28px; margin-top: 2px; } .hcm-tb-title { font-size: 16px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.hcm-tb-crumbs { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 4px 8px; align-items: baseline; flex-wrap: wrap; } +.hcm-tb-crumbs { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 4px 8px; align-items: baseline; flex-wrap: wrap; } .hcm-tb-crumbs .hcm-tree-level { flex: 0 0 auto; } .hcm-tb-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .hcm-tb-who { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; font-size: 13px; } @@ -73,9 +73,9 @@ .hcm-tb-who-name a { color: inherit; text-decoration: none; } .hcm-tb-who-name a:hover { color: var(--accent-cyan); text-decoration: underline; } .hcm-tb-who-name > .um-hint { margin-left: 6px; } .hcm-tb-who-name div.um-hint { margin-left: 0; } -.hcm-tb-role { flex: 0 0 auto; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap; } +.hcm-tb-role { flex: 0 0 auto; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-secondary); white-space: nowrap; } .hcm-tb-x { width: 22px; height: 22px; border: none; background: none; color: var(--text-muted); font-size: 16px; border-radius: 4px; cursor: pointer; line-height: 1; } -.hcm-tb-x:hover { color: var(--accent-red, #ef4444); background: rgba(239, 68, 68, .1); } +.hcm-tb-x:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); } .hcm-tb-x-pad { width: 22px; } @media (max-width: 900px) { .hcm-tb { flex-direction: column; height: auto; } .hcm-tb-cols { height: 300px; } .hcm-tb-col { flex-basis: 170px; } .hcm-tb-pane { min-width: 0; border-top: 1px solid var(--border); } } diff --git a/dashboard/static/favicon.svg b/dashboard/static/favicon.svg new file mode 100644 index 0000000..27b1446 --- /dev/null +++ b/dashboard/static/favicon.svg @@ -0,0 +1 @@ + diff --git a/dashboard/static/index.html b/dashboard/static/index.html index 215807a..d1fd266 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -4,8 +4,7 @@ HyperCore Manager - - + + + diff --git a/dashboard/templates/account.html b/dashboard/templates/account.html index 675d37f..982bd8b 100644 --- a/dashboard/templates/account.html +++ b/dashboard/templates/account.html @@ -6,7 +6,7 @@ HyperCore Manager - + {% include '_auth_style.html' %} diff --git a/dashboard/templates/console.html b/dashboard/templates/console.html index e535901..df8cff2 100644 --- a/dashboard/templates/console.html +++ b/dashboard/templates/console.html @@ -4,7 +4,7 @@ Console - + +{% if mode != 'guest' %}{% endif %} +{{ theme_inline() }}
{{ title }} {{ subtitle }} - {% if view_only %}read-only{% endif %} + {% if view_only %}read-only{% endif %} {% if not view_only %} diff --git a/dashboard/templates/guest.html b/dashboard/templates/guest.html index cc25a5c..81bfe32 100644 --- a/dashboard/templates/guest.html +++ b/dashboard/templates/guest.html @@ -14,22 +14,23 @@ document.write('<\/scr'+'ipt>'); })(); +{{ theme_inline() }} diff --git a/dashboard/templates/invite.html b/dashboard/templates/invite.html index b0a0c94..5e18ac4 100644 --- a/dashboard/templates/invite.html +++ b/dashboard/templates/invite.html @@ -6,7 +6,7 @@ HyperCore Manager - + {% include '_auth_style.html' %} diff --git a/dashboard/templates/login.html b/dashboard/templates/login.html index 3bc047d..89af5bc 100644 --- a/dashboard/templates/login.html +++ b/dashboard/templates/login.html @@ -4,7 +4,7 @@ HyperCore Manager — {{ t.title }} - + {% include '_auth_style.html' %} diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index b1e063d..aa961cd 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,31 @@ All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/). +## [1.8.0] + +### Changed +- **A new look, with a light and a dark theme.** The dashboard no longer looks like a generated tool: IBM Plex + Sans for text and Plex Mono for figures (served by the dashboard itself, so sites without internet keep them), + normal capitalisation instead of small monospace capitals, no glows. The light theme is graphite and teal, the + dark theme warm charcoal and amber. The dashboard follows the computer's light/dark setting; **☾ Dark / + ☀ Light** in the top bar overrides it per browser. Login, invitation and account pages, the console, the guest + page and the manual follow the same theme. +- **Top bar instead of the left rail.** The cluster list moved into a **cluster switcher** in the top bar: the + button shows the selected cluster, its folder and badges for alerts on your other clusters; the list itself + (folders, search, alert badges, dry-run/live, health) opens under it. Settings is a module tab; Modules, + Account, the Manual and Sign out are in the user menu (your initials). Sub-tabs are plain underline tabs, one + button style throughout, dialogs with a calm backdrop. +- Every colour comes from one file, `dashboard/static/theme.css`, with a block per theme; a new theme is one more + block. A test fails on any colour written anywhere else. Charts read their colours from the theme and redraw + when it changes. +- Headings, tunable labels and a few interface texts in normal case; texts that pointed at "the rail" now say + "the cluster list" (4 languages). + +### Documentation +- Getting around describes the top bar, the cluster switcher and light/dark; Getting started, the manual and the + README follow the new navigation. Every screenshot in the manual and the README retaken in the new look (light + theme), Foresight and the Clusterbalancer with live analysis data. + ## [1.7.4] ### Fixed diff --git a/docs/administration.md b/docs/administration.md index 98dfc14..72a9171 100644 --- a/docs/administration.md +++ b/docs/administration.md @@ -29,7 +29,7 @@ for any of its customers, a customer admin within their own customer. 1. **+ Cluster.** Give it a name (unique within the folder; two customers may both have a "Production"), the management address (any node IP or hostname; `https://` and `/rest/v1` are added for you), a HyperCore account and password, and whether to verify the - TLS certificate. Pick a colour if you like; it is used in the rail. + TLS certificate. Pick a colour if you like; it is used in the cluster list and the switcher. 2. **Test connection** logs in and reports the cluster name, node count and HyperCore version before anything is stored. Registering a cluster that is already registered is refused (same HyperCore cluster identity). The refusal names the existing entry only to someone who may see @@ -77,7 +77,7 @@ still hit that limit; give HyperCore Manager its own account where possible. - **Remove** stops everything immediately and asks whether to purge the cluster's Foresight history and settings as well. - **Duplicate warning.** If two entries turn out to point at the same HyperCore cluster (for - example two node addresses), the rail flags the newer one and only the older one balances. + example two node addresses), the cluster list flags the newer one and only the older one balances. Remove or disable the duplicate. Only one HyperCore Manager installation may balance a cluster live. A second installation @@ -87,13 +87,13 @@ pointed at the same cluster must stay in dry-run. Every cluster starts in dry-run: the balancer logs what it would do and moves nothing. Watch the migration log on the Clusterbalancer tab for a while; when the decisions look right, switch -**Dry run** off in that cluster's balancer settings. The rail badge changes from **DRY RUN** to +**Dry run** off in that cluster's balancer settings. The cluster list changes from **Dry run** to **LIVE**. ### Tunables **Settings → Tunables** edits the balancer and Foresight parameters of the cluster selected in -the rail. The target bar at the top switches to the **Defaults** template (used for clusters +the cluster switcher. The target bar at the top switches to the **Defaults** template (used for clusters registered from now on) and offers **Apply to all clusters** for a value you want everywhere. Changes take effect without a restart. @@ -109,9 +109,9 @@ whole installation adds a second customer or MSP with **+ Customer** or **+ MSP* Access → Tenants**; the levels then show everywhere. The existing folders stay under the default customer ("Default" in the MSP "Default"): rename both to your own company. -- **New folder** is at the bottom of the rail (for whoever manages the tree at customer level or +- **+ New folder** is at the bottom of the cluster list (open the cluster switcher; for whoever manages the tree at customer level or above). Folders can be renamed, deleted (their clusters stay registered and fall back to **No - folder**), collapsed individually, or all at once from the rail header. + folder**), collapsed individually, or all at once from the top of the list. - The **cluster menu** ("…" on a cluster) moves it to another folder of the same customer; moving it to another customer or MSP is for administrators of the whole installation. - The **folder menu** ("…" on a folder) holds **Access…**, **Backup target**, **Rename** and @@ -134,7 +134,7 @@ customer ("Default" in the MSP "Default"): rename both to your own company. and the console log leaves out their address. Roles defined higher up can still be handed out below; only where they were defined is not shown. - Users below folder level (engineers, application managers, viewers) and folder administrators - see their clusters as one list in the rail, without folders. + see their clusters as one list in the cluster switcher, without folders. --- @@ -361,7 +361,7 @@ stored credentials. Both run from the backup container, so they prove what the s ### Assigning a target -From the folder menu in the rail, **Backup target** picks one of the defined targets for that +From the folder menu in the cluster list, **Backup target** picks one of the defined targets for that folder (or clears it). Every cluster in the folder backs up there. The **No folder** group has the same menu; its target is flagged as the default for clusters without a folder. @@ -557,7 +557,7 @@ the copies already on the target. ## Account -Everyone has an **Account** page in the rail footer: the own name and email address, the own +Everyone has an **Account** page in the user menu (top right): the own name and email address, the own password, TOTP two-factor (scan the QR code, confirm with a code), and the language selector in the header. Administrators use the same page for their own account. diff --git a/docs/manual/01-getting-around.md b/docs/manual/01-getting-around.md index 115b110..dc8b027 100644 --- a/docs/manual/01-getting-around.md +++ b/docs/manual/01-getting-around.md @@ -8,15 +8,21 @@ with its username); if your account has two-factor authentication, the one-time asked next. On the first login everyone sees a one-time notice that this is community-supported software and where to report issues. -**The rail.** The left-hand rail lists folders and the clusters in them. Folders collapse, carry -a colour, and the search box at the top matches folder names, cluster names and addresses. -Under each cluster you see when it was last seen, whether its balancer runs in dry-run or live, -and its health score once Foresight has one. Click a cluster to select it; every tab then shows -that cluster. Folders sit in the tenant tree (MSP › customer › folder, Settings → Access → Tenants); -whoever may manage them there can create folders and move clusters between them from the folder -menu (the "⋯" button). You see only the folders and clusters your roles reach. - -**Alert badges.** Next to a cluster's name, coloured badges count what is wrong on it right now, +**The top bar.** From left to right: the wordmark, the **cluster switcher**, the module tabs, and on +the right the connection state, **Refresh**, the updater's state for administrators, the language, +the light/dark switch and your user menu. + +**The cluster switcher.** The button shows the selected cluster, the folder it is in, and badges for +alerts on your *other* clusters, so a problem elsewhere stays visible. Click it for the cluster list: +folders and the clusters in them, with a search box that matches folder names, cluster names and +addresses. Folders collapse and carry a colour. Under each cluster you see when it was last seen, +whether its balancer runs in dry-run or live, and its health score once Foresight has one. Click a +cluster to select it; every tab then shows that cluster. Folders sit in the tenant tree (MSP › +customer › folder, Settings → Access → Tenants); whoever may manage them there creates folders with +**+ New folder** at the bottom of the list and moves clusters between them from the folder menu (the +"⋯" button). You see only the folders and clusters your roles reach. + +**Alert badges.** Next to a cluster's name in the cluster list, coloured badges count what is wrong on it right now, in the order and colours of HyperCore's own cluster header: red ✕ critical, orange ⚠ warning, yellow ? notice, blue i info. Only badges with a count show. They carry the cluster's active HyperCore conditions (a failed drive, a node low on memory; HyperCore's own descriptions, in @@ -28,11 +34,15 @@ lists past conditions with their start, end and duration, filtered by severity a The badges are an overview, up to five minutes behind the cluster, not an alarm: HyperCore's own e-mail and syslog alerts stay the place for that. -**The tabs.** Across the top: Infraviewer, Clusterbalancer, Foresight and Backup, each with its -own sub-panels. The rail footer holds Modules and Settings (for whoever holds a permission -behind one of their panels) and Account (everyone). The header shows the breadcrumb, the connection state to the backend, a Refresh -button, the updater's state for administrators, and the language selector: English, Dutch, -French and German. +**The tabs.** In the top bar: Infraviewer, Clusterbalancer, Foresight, Backup and Settings (Settings +for whoever holds a permission behind one of its panels), each with its own sub-tabs below the +breadcrumb. The user menu (your initials, far right) holds Modules for administrators of the whole +installation, Account, the Manual and Sign out. The language selector offers English, Dutch, French +and German. + +**Light and dark.** The dashboard follows your computer's light or dark setting. **☾ Dark** / +**☀ Light** in the top bar overrides that for this browser; the login page, the console and the +manual follow the same choice. **Reading the screens.** Every chart is live and refreshes on its own every 30 seconds; the time range selectors on a tab apply to that tab. A grey badge or a dash means no data yet: a diff --git a/docs/manual/01a-getting-started.md b/docs/manual/01a-getting-started.md index 437071d..8bb8cac 100644 --- a/docs/manual/01a-getting-started.md +++ b/docs/manual/01a-getting-started.md @@ -26,7 +26,7 @@ the cluster **Acme-Prod**, then gives **jane@acme.example** access to them. Use ![Settings, Access, Tenants](img/gs-01-open-tenants.png) Open the tenant tree: -1. Click **Settings** at the bottom of the rail. +1. Click **Settings** in the top bar. 2. Click **Access**. 3. Click **Tenants**. @@ -37,7 +37,7 @@ whatever you selected. **One company or several?** A new installation starts as a single company: the MSP and customer levels exist but are hidden, and you only see folders. - **If you run HyperCore Manager for your own company only,** skip steps 2 and 3. Add folders with - **+ Folder** in the folder column (or **New folder** at the bottom of the rail) and continue at + **+ Folder** in the folder column (or **+ New folder** at the bottom of the cluster list, under the cluster switcher) and continue at step 4. - **If you serve customers,** continue with step 2. @@ -46,7 +46,7 @@ levels exist but are hidden, and you only see folders. ![+ MSP on a new installation](img/gs-02-add-msp-single.png) On a new installation, click **+ MSP** at the top of the Tenants tab (1) and confirm. The MSP and -customer levels now show everywhere: in Access, in the rail and in paths. +customer levels now show everywhere: in Access, in the cluster list and in paths. Folders and clusters that already existed stay where they were, under the customer **Default** in the MSP **Default**. Rename those to your own company later (select it, then **Rename** in the @@ -77,7 +77,7 @@ Type the name, **Example IT**, and click **OK** (1). 2. Click **+ Folder** at the foot of the folder column, type **Production** and click **OK**. A folder groups the clusters that belong together. It is also where the backup target is set (the -folder menu "⋯" in the rail → **Backup target**). If the customer has a DR cluster, give it a folder of +folder menu "⋯" in the cluster list → **Backup target**). If the customer has a DR cluster, give it a folder of its own or put it in this one with the role **DR**; see the Backup chapter. ## 5. Add the cluster @@ -104,7 +104,7 @@ The other fields can stay as they are. HyperCore version, in green under the fields. 2. Click **Add cluster**. -Within a minute the cluster appears in the rail and the first charts fill. The balancer starts in +Within a minute the cluster appears in the cluster switcher and the first charts fill. The balancer starts in **dry-run**: it only logs what it would do. Switch dry-run off later in Clusterbalancer once you have checked its settings. @@ -183,7 +183,7 @@ access. ![Jane's first login](img/gs-08-jane-view.png) When Jane logs in, she sees only Acme's cluster, with the tabs her roles allow: Infraviewer, -Clusterbalancer, Foresight and Backup. As Engineer she also gets **+ New VM** and the **Edit** and +Clusterbalancer, Foresight and Backup, and Settings for the panels she may see there. As Engineer she also gets **+ New VM** and the **Edit** and **Console** buttons. **Access…** on Jane in the Users tab lists all her access in one place. ## Next steps diff --git a/docs/manual/03-clusterbalancer.md b/docs/manual/03-clusterbalancer.md index 2b322f6..7dca88c 100644 --- a/docs/manual/03-clusterbalancer.md +++ b/docs/manual/03-clusterbalancer.md @@ -9,8 +9,8 @@ did and lets you tune it; the engines themselves run in the balancer container. A newly registered cluster starts in **dry-run**: the balancer analyses, decides and logs every move it would make, but moves nothing. Leave it there for a day or two and read the migration -log. When the decisions look right, switch `DRY_RUN` off under Balancer Settings. The rail shows -DRY RUN or LIVE under every cluster so there is never a doubt which mode you are in. +log. When the decisions look right, switch `DRY_RUN` off under Balancer Settings. The cluster list shows +Dry run or Live under every cluster so there is never a doubt which mode you are in. Only one installation may balance a given cluster live. If a second HyperCore Manager points at the same cluster, keep its balancer in dry-run, otherwise the two move VMs against each other. diff --git a/docs/manual/08-installing-and-updating.md b/docs/manual/08-installing-and-updating.md index 2020c48..5c8db07 100644 --- a/docs/manual/08-installing-and-updating.md +++ b/docs/manual/08-installing-and-updating.md @@ -396,7 +396,7 @@ docker compose up -d ## Updating -**From the dashboard.** The header shows **Update** when a newer release is available. Apply it +**From the dashboard.** The top bar shows **Update** when a newer release is available. Apply it and the checkout moves to exactly that release tag from its own git origin (never to commits made after it), then the stack rebuilds and restarts the application services. The update is applied only to an installation on the default branch (`master`) or pinned to an earlier release tag, @@ -476,12 +476,12 @@ at a time: `curl -H "Authorization: Bearer " "http://localhost:8081/api/v or wrong `.env` value, or PostgreSQL or InfluxDB not healthy yet; the dependency handles the latter, wait a minute and look again. -**The balancer is not migrating VMs.** The rail badge says **dry run** or **live**; switch it +**The balancer is not migrating VMs.** The cluster list says **Dry run** or **Live** under the cluster; switch it in Clusterbalancer → settings. Balancing only triggers when a node exceeds the CPU or RAM thresholds, never to or from an excluded node, and not at all while the cluster is flagged as a duplicate registration. The balancer log says `would migrate` or `skipping` and why. -**A cluster shows "duplicate" in the rail.** Two registry entries point at the same HyperCore +**A cluster shows "duplicate" in the cluster list.** Two registry entries point at the same HyperCore cluster, for instance two node addresses. Remove or disable one; the other resumes. **The Backup tab is missing.** It appears only while the `backup` container is healthy and the diff --git a/docs/manual/README.md b/docs/manual/README.md index 0d85d58..e4d2a5b 100644 --- a/docs/manual/README.md +++ b/docs/manual/README.md @@ -9,7 +9,7 @@ users, backup targets and proxies) are in [administration.md](../administration. |---|---| | [Installing and updating](08-installing-and-updating.md) | prerequisites, the installer `install.py` or a hand-written `.env`, first login, the backup proxy's host, every `.env` setting, hardening, backing up the installation, updating and upgrading from 0.9.x, health checks, troubleshooting | | [Connectivity](09-connectivity.md) | every connection between the HCM host, clusters, proxies, the backup share and browsers: direction, ports and protocols, for firewall planning | -| [Getting around](01-getting-around.md) | the cluster rail and its alert badges, folders, tabs, roles, language, the first-login notice | +| [Getting around](01-getting-around.md) | the top bar, the cluster switcher and its alert badges, folders, tabs, roles, language, light and dark, the first-login notice | | [Getting started](01a-getting-started.md) | step by step from an empty installation: an MSP, a customer, a folder, a cluster, then a user and their rights on each | | [Infraviewer](02-infraviewer.md) | nodes, drives, VMs and storage performance; the cluster activity panel | | [Clusterbalancer](03-clusterbalancer.md) | the migration log, the balancer's settings, the Oracle's forecast log, placement tags | @@ -28,10 +28,10 @@ role holds all of them. schedule, a test plan, a restore) opens a dialog over the page; Escape, ✕ or **Cancel** closes it without saving. -**Everything is per cluster.** The cluster selected in the rail on the left drives every tab. -The breadcrumb in the header tells you which folder, cluster and tab you are looking at. +**Everything is per cluster.** The cluster selected in the cluster switcher (top bar) drives every tab. +The breadcrumb under the top bar tells you which folder, cluster and tab you are looking at. Screenshots in this manual were taken on a three-node lab cluster; your numbers will differ. -The manual is also served by the dashboard itself: **Manual** in the rail under Account opens +The manual is also served by the dashboard itself: **Manual** in the user menu (your initials, top right) opens it at `/manual`, so it is at hand on a site without internet access. diff --git a/docs/manual/img/account.png b/docs/manual/img/account.png index 1ccd7ae..c96ea93 100644 Binary files a/docs/manual/img/account.png and b/docs/manual/img/account.png differ diff --git a/docs/manual/img/backup-import.png b/docs/manual/img/backup-import.png index da40711..9820d5f 100644 Binary files a/docs/manual/img/backup-import.png and b/docs/manual/img/backup-import.png differ diff --git a/docs/manual/img/backup-points.png b/docs/manual/img/backup-points.png index 3676e26..c3fea8f 100644 Binary files a/docs/manual/img/backup-points.png and b/docs/manual/img/backup-points.png differ diff --git a/docs/manual/img/backup-policies.png b/docs/manual/img/backup-policies.png index 2d0dfb7..00e8b0b 100644 Binary files a/docs/manual/img/backup-policies.png and b/docs/manual/img/backup-policies.png differ diff --git a/docs/manual/img/backup-policy-night.png b/docs/manual/img/backup-policy-night.png index c6db84a..a7619b8 100644 Binary files a/docs/manual/img/backup-policy-night.png and b/docs/manual/img/backup-policy-night.png differ diff --git a/docs/manual/img/backup-restore-form.png b/docs/manual/img/backup-restore-form.png index 931945d..61fcf31 100644 Binary files a/docs/manual/img/backup-restore-form.png and b/docs/manual/img/backup-restore-form.png differ diff --git a/docs/manual/img/backup-runs.png b/docs/manual/img/backup-runs.png index 73bacdc..03cc792 100644 Binary files a/docs/manual/img/backup-runs.png and b/docs/manual/img/backup-runs.png differ diff --git a/docs/manual/img/backup-schedules.png b/docs/manual/img/backup-schedules.png index 847257b..b48d34d 100644 Binary files a/docs/manual/img/backup-schedules.png and b/docs/manual/img/backup-schedules.png differ diff --git a/docs/manual/img/backup-vms.png b/docs/manual/img/backup-vms.png index 6aedaf4..24f0bd5 100644 Binary files a/docs/manual/img/backup-vms.png and b/docs/manual/img/backup-vms.png differ diff --git a/docs/manual/img/clusterbalancer-forecastlog.png b/docs/manual/img/clusterbalancer-forecastlog.png index 2d5628d..b5926a7 100644 Binary files a/docs/manual/img/clusterbalancer-forecastlog.png and b/docs/manual/img/clusterbalancer-forecastlog.png differ diff --git a/docs/manual/img/clusterbalancer-miglog.png b/docs/manual/img/clusterbalancer-miglog.png index db84496..0f85fe6 100644 Binary files a/docs/manual/img/clusterbalancer-miglog.png and b/docs/manual/img/clusterbalancer-miglog.png differ diff --git a/docs/manual/img/clusterbalancer-settings.png b/docs/manual/img/clusterbalancer-settings.png index eb4ed12..72d40cb 100644 Binary files a/docs/manual/img/clusterbalancer-settings.png and b/docs/manual/img/clusterbalancer-settings.png differ diff --git a/docs/manual/img/foresight-exhaustion.png b/docs/manual/img/foresight-exhaustion.png index 5672273..6347dc8 100644 Binary files a/docs/manual/img/foresight-exhaustion.png and b/docs/manual/img/foresight-exhaustion.png differ diff --git a/docs/manual/img/foresight-forecasts.png b/docs/manual/img/foresight-forecasts.png index 8f47a4b..3e3105e 100644 Binary files a/docs/manual/img/foresight-forecasts.png and b/docs/manual/img/foresight-forecasts.png differ diff --git a/docs/manual/img/foresight-overview.png b/docs/manual/img/foresight-overview.png index 1916b12..9bafa56 100644 Binary files a/docs/manual/img/foresight-overview.png and b/docs/manual/img/foresight-overview.png differ diff --git a/docs/manual/img/foresight-reports.png b/docs/manual/img/foresight-reports.png index ccdc7ec..e39ba54 100644 Binary files a/docs/manual/img/foresight-reports.png and b/docs/manual/img/foresight-reports.png differ diff --git a/docs/manual/img/foresight-rightsizing.png b/docs/manual/img/foresight-rightsizing.png index b4c9fb8..47d8049 100644 Binary files a/docs/manual/img/foresight-rightsizing.png and b/docs/manual/img/foresight-rightsizing.png differ diff --git a/docs/manual/img/foresight-sentsettings.png b/docs/manual/img/foresight-sentsettings.png index a02b355..b0322ea 100644 Binary files a/docs/manual/img/foresight-sentsettings.png and b/docs/manual/img/foresight-sentsettings.png differ diff --git a/docs/manual/img/foresight-whatif.png b/docs/manual/img/foresight-whatif.png index a9757c5..a4e3ad6 100644 Binary files a/docs/manual/img/foresight-whatif.png and b/docs/manual/img/foresight-whatif.png differ diff --git a/docs/manual/img/gs-01-open-tenants.png b/docs/manual/img/gs-01-open-tenants.png index 979fecc..320b718 100644 Binary files a/docs/manual/img/gs-01-open-tenants.png and b/docs/manual/img/gs-01-open-tenants.png differ diff --git a/docs/manual/img/gs-02-add-msp-single.png b/docs/manual/img/gs-02-add-msp-single.png index 56d07be..360f83a 100644 Binary files a/docs/manual/img/gs-02-add-msp-single.png and b/docs/manual/img/gs-02-add-msp-single.png differ diff --git a/docs/manual/img/gs-02b-add-msp-column.png b/docs/manual/img/gs-02b-add-msp-column.png index bf6182b..3c36bd5 100644 Binary files a/docs/manual/img/gs-02b-add-msp-column.png and b/docs/manual/img/gs-02b-add-msp-column.png differ diff --git a/docs/manual/img/gs-02c-name-prompt.png b/docs/manual/img/gs-02c-name-prompt.png index 0ed4db2..2e034b2 100644 Binary files a/docs/manual/img/gs-02c-name-prompt.png and b/docs/manual/img/gs-02c-name-prompt.png differ diff --git a/docs/manual/img/gs-03-add-customer.png b/docs/manual/img/gs-03-add-customer.png index 3c1d3c2..342e0f1 100644 Binary files a/docs/manual/img/gs-03-add-customer.png and b/docs/manual/img/gs-03-add-customer.png differ diff --git a/docs/manual/img/gs-04-add-folder.png b/docs/manual/img/gs-04-add-folder.png index ad7e00b..63aad3e 100644 Binary files a/docs/manual/img/gs-04-add-folder.png and b/docs/manual/img/gs-04-add-folder.png differ diff --git a/docs/manual/img/gs-05-add-cluster.png b/docs/manual/img/gs-05-add-cluster.png index 71f7937..49af14c 100644 Binary files a/docs/manual/img/gs-05-add-cluster.png and b/docs/manual/img/gs-05-add-cluster.png differ diff --git a/docs/manual/img/gs-05b-cluster-dialog.png b/docs/manual/img/gs-05b-cluster-dialog.png index 68a06d2..f165ab4 100644 Binary files a/docs/manual/img/gs-05b-cluster-dialog.png and b/docs/manual/img/gs-05b-cluster-dialog.png differ diff --git a/docs/manual/img/gs-06-users-invite.png b/docs/manual/img/gs-06-users-invite.png index 2f19b10..5a2c9ce 100644 Binary files a/docs/manual/img/gs-06-users-invite.png and b/docs/manual/img/gs-06-users-invite.png differ diff --git a/docs/manual/img/gs-06b-invite-dialog.png b/docs/manual/img/gs-06b-invite-dialog.png index 1d9ab3b..ca5630f 100644 Binary files a/docs/manual/img/gs-06b-invite-dialog.png and b/docs/manual/img/gs-06b-invite-dialog.png differ diff --git a/docs/manual/img/gs-07-assign.png b/docs/manual/img/gs-07-assign.png index 981d903..4219249 100644 Binary files a/docs/manual/img/gs-07-assign.png and b/docs/manual/img/gs-07-assign.png differ diff --git a/docs/manual/img/gs-07b-assign-dialog.png b/docs/manual/img/gs-07b-assign-dialog.png index 623dc42..4466989 100644 Binary files a/docs/manual/img/gs-07b-assign-dialog.png and b/docs/manual/img/gs-07b-assign-dialog.png differ diff --git a/docs/manual/img/gs-07c-cluster-pane.png b/docs/manual/img/gs-07c-cluster-pane.png index a69c2d1..7e773c8 100644 Binary files a/docs/manual/img/gs-07c-cluster-pane.png and b/docs/manual/img/gs-07c-cluster-pane.png differ diff --git a/docs/manual/img/gs-08-jane-view.png b/docs/manual/img/gs-08-jane-view.png index 7b15baa..00b95e7 100644 Binary files a/docs/manual/img/gs-08-jane-view.png and b/docs/manual/img/gs-08-jane-view.png differ diff --git a/docs/manual/img/infraviewer-nodes.png b/docs/manual/img/infraviewer-nodes.png index 7a1f6ca..512d5eb 100644 Binary files a/docs/manual/img/infraviewer-nodes.png and b/docs/manual/img/infraviewer-nodes.png differ diff --git a/docs/manual/img/infraviewer-vms.png b/docs/manual/img/infraviewer-vms.png index ed36526..9592a51 100644 Binary files a/docs/manual/img/infraviewer-vms.png and b/docs/manual/img/infraviewer-vms.png differ diff --git a/docs/manual/img/login.png b/docs/manual/img/login.png index d6da91d..f112383 100644 Binary files a/docs/manual/img/login.png and b/docs/manual/img/login.png differ diff --git a/docs/manual/img/modules.png b/docs/manual/img/modules.png index 6647964..c4f4e99 100644 Binary files a/docs/manual/img/modules.png and b/docs/manual/img/modules.png differ diff --git a/docs/manual/img/settings-shares.png b/docs/manual/img/settings-shares.png index 4290487..467b1c3 100644 Binary files a/docs/manual/img/settings-shares.png and b/docs/manual/img/settings-shares.png differ diff --git a/docs/manual/img/settings-tenants.png b/docs/manual/img/settings-tenants.png index a953ec6..1bc9506 100644 Binary files a/docs/manual/img/settings-tenants.png and b/docs/manual/img/settings-tenants.png differ diff --git a/docs/manual/img/settings-tunables.png b/docs/manual/img/settings-tunables.png index cf82732..69c3301 100644 Binary files a/docs/manual/img/settings-tunables.png and b/docs/manual/img/settings-tunables.png differ diff --git a/docs/manual/img/settings-users.png b/docs/manual/img/settings-users.png index dbe674f..b7d2412 100644 Binary files a/docs/manual/img/settings-users.png and b/docs/manual/img/settings-users.png differ diff --git a/tests/test_theme_tokens.py b/tests/test_theme_tokens.py new file mode 100644 index 0000000..72f4368 --- /dev/null +++ b/tests/test_theme_tokens.py @@ -0,0 +1,61 @@ +"""Every colour of the dashboard comes from a theme token (dashboard/static/theme.css). + +A colour written straight into a page, a script or a template would ignore the theme: it stays the same in light +and dark, and a future theme would show it as a stray. This test fails on any colour literal (#rgb, #rrggbb, +rgb(), rgba(), hsl()) outside theme.css. + +Allowed, on purpose: + - a line carrying the marker `token-ok`: a colour that is data rather than theme (a user-picked folder colour, + a report's own accent, a value computed from a token); + - data: URIs (the favicon); + - the vendored libraries and the translation files, which are not ours or hold no styling. +The mails sent by the dashboard are not covered: mail clients ignore the page's stylesheet, so they keep their +own inline colours. +""" +import re +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +DASH = ROOT / 'dashboard' +COLOUR = re.compile(r'(?