feat(ui): show service version label and add restart action#246
Merged
Conversation
Every surface that lists services (lerd service list, lerd status, Web UI
list + detail header, TUI services pane) now shows a version label next
to each service: mysql v8.0, redis v7, postgres v16, meilisearch v1.7.
The label comes from the installed quadlet's Image= tag via a new
podman.ServiceVersionLabel helper that strips distro/variant suffixes
(-alpine, -slim, -3.5), keeps a leading v, and passes rolling tags
(latest, main) through unchanged. Reads the file on disk so user image
overrides from config.yaml are reflected instead of the embed default.
Versioned presets (mysql-5-7, mongo-6, etc.) keep their raw name in the
CLI and TUI and show the version alongside. The Web UI serviceLabel
renderer now returns just the family label for those names so the
version badge appears as a separate chip, matching the built-in rows.
The Web UI service detail gains a Restart button that calls a new
/api/services/{name}/restart handler wrapping podman.RestartUnit.
Workers (queue, schedule, horizon, reverb, stripe) are excluded from
the button since their stop-only flow is unchanged.
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.
Adds a version label next to every service in lerd service list, lerd status, the Web UI list and detail header, and the TUI services pane. The label comes from the installed quadlet's Image tag and renders as v8.0 for mysql, v7 for redis, v16 for postgres, v1.7 for meilisearch, and so on. Rolling tags like latest or main pass through as is. Reading the installed file on disk means the label reflects user image overrides from config.yaml rather than the embedded default.
Versioned presets (installed via lerd service preset mysql --version 5.7 and friends) keep their raw service name in the CLI and TUI so mysql-5-7 shows next to v5.7. The Web UI's serviceLabel transform previously rendered mysql-5-7 as "MySQL 5.7", so now it returns just the family label and the version badge appears as a separate chip, matching how built-in rows read.
The service detail page in the Web UI also gains a Restart button next to Start and Stop, matching the site container row. It posts to a new /api/services/name/restart handler which wraps podman.RestartUnit and clears the paused flag on success. Workers like queue, schedule, horizon, reverb and stripe are excluded since their flow is stop only.