Repository navigation
feat(nodes): the node's OS as its card's logo, details on a click - #154
Merged
Merged
Conversation
…a tap The card's icon was the same server glyph for every node. A node's panel now reports its operating system in the dashboard's host info (/etc/os-release: ID, NAME, VERSION_ID, PRETTY_NAME; kernel and architecture), and the new nodes/<id>/os/ asks a node for it with the parent's key (kept an hour). The card shows the OS as an app icon in the panel's soft style (Ubuntu, Debian, CentOS, Rocky, Alma, Fedora, Alpine, Arch, openSUSE, Red Hat, Mint, Gentoo, FreeBSD; Tux for any other Linux; the old glyph when not known): a tile tinted with the brand colour, a gloss and a fine border, the logo in the brand colour (a lighter one in the dark theme for black / navy brands). With the mouse on it the logo turns and bounces and a band of light sweeps the tile. A tap opens a small popover with the OS, its version, the kernel and the architecture. Logos from Simple Icons (CC0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🥷 Ninja i18n – 🛎️ Translations need to be updatedProject
|
| lint rule | new reports | level | link |
|---|---|---|---|
| Identical pattern | 6 | warning | contribute (via Fink 🐦) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Every node card on the Nodes page had the same generic server glyph, and the panel did not know which operating system a node's server runs. Admins asked for the OS's logo on the card, and its name and version on a click, without leaving the page.
Change
hutils/system_metrics.py:os_info()reads/etc/os-release(ID,NAME,VERSION_ID,PRETTY_NAME), the kernel release and the architecture, once per process.dashboard_schema.py:DashboardHostgetsos_id,os_name,os_version,os_pretty,kernelandarch. They default to empty, so a node of an older version still validates.nodes_api.py: newGET nodes/<id>/os/(super admin). It asks the node's own dashboard (include=system) with the parent's key and caches the answer in redis for an hour (an empty answer for 5 minutes).features/nodes/os-logos.ts: 14 logos as SVG paths with their brand colours, from Simple Icons 16.36.0 (CC0). No new dependency: only these paths are vendored./etc/os-releaseIDs are mapped to them; any other Linux gets Tux.NodesView.vue: the card's icon is a button showing the OS logo as a soft app icon.prefers-reduced-motion.nodes.os.*strings in 7 languages.Screenshots
On a click:
Dark theme:
Hover:
All logos, light and dark:
Tested
/etc/os-release;:hover: the built CSS has it only there, and a browser check reportednonewithout the mouse.vue-tsc: no errors in the changed files.Review
node_os(); old nodes simply leave the fields empty.🤖 Generated with Claude Code