Repository navigation
fix(webui): match the VM status colour to the plugin's vm_alert - #3697
Merged
Merged
Conversation
`plugin-vms.vue` decided the status colour inline:
:class="vm.status == 'stopped' ? 'careful' : 'ok'"
`VmsPlugin.vm_alert()` — which the TUI calls directly at
`vms/__init__.py:271` — classifies three states the WebUI had never heard of:
running -> OK
starting, restarting, delayed shutdown -> WARNING
everything else -> INFO
So the only status the WebUI recognised was `stopped`, and **every other
non-running state fell through to "ok"**. A VM that is starting, restarting,
or in delayed shutdown rendered green in the browser while the TUI showed
WARNING — a VM stuck restarting looked healthy. `stopped` was also
over-reported as CAREFUL where the plugin says INFO.
`getStatusClass` now mirrors `vm_alert`, and follows the shape
`plugin-containers.vue` already uses for its equivalent (`container_alert`),
including returning `info` for the fallback.
Evidence, since the WebUI has no JS test runner: the string
`delayed shutdown` goes 0 -> 1 occurrences in the rebuilt bundle. It was
absent entirely before, which is the point — that state had no representation
in the WebUI at all.
`npx eslint` on the component: 0 errors. Its 5 warnings sit at lines 9/15/19/24
(header attributes) and 69 (the props block); this change touches line 35 and
adds a methods block, so none of them are new.
ntdatt812
force-pushed
the
fix/webui-vms-status
branch
from
August 29, 2026 08:12
ea1c2f1 to
15ee238
Compare
Contributor
Author
|
Reworked per your note on #3699: rebased onto current |
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.
plugin-vms.vuedecided the status colour inline:VmsPlugin.vm_alert()— which the TUI calls directly atvms/__init__.py:271— knows three states the WebUI had never heard of:runningstartingrestartingdelayed shutdownstoppedThe only status the WebUI recognised was
stopped, so every other non-running state fell through to green. A VM stuck restarting looked healthy in the browser while the TUI flagged it WARNING.stoppedwent the other way and was over-reported as CAREFUL.The fix
getStatusClassmirrorsvm_alert, and follows the shapeplugin-containers.vuealready uses for its equivalent (container_alert) — including returninginfofor the fallback, which is that component's existing convention.I checked
plugin-containers.vueagainstcontainer_alertwhile I was here, since it is the closest sibling: it matches exactly, so nothing to do there.Evidence
The WebUI has no JS test runner, so the proof is the rebuilt bundle: the string
delayed shutdowngoes 0 → 1 occurrences. It was absent entirely before — which is the finding, not just the diff: that state had no representation in the WebUI at all.glances.js686883 → 686996 bytes, only the component and the bundle changed.npx eslinton the component: 0 errors. Its 5 warnings sit at lines 9/15/19/24 (header attributes) and 69 (the props block); this change touches line 35 and appends a methods block, so none of them are new.