From: Dominik Csapak <d.csapak@proxmox.com>
To: Lukas Wagner <l.wagner@proxmox.com>, pdm-devel@lists.proxmox.com
Subject: Re: [PATCH datacenter-manager v2 7/9] ui: pve: show ha maintenance mode for nodes
Date: Thu, 20 Aug 2026 13:20:21 +0200 [thread overview]
Message-ID: <ebe59c8d-fcf1-41a5-b826-9d6892b90de8@proxmox.com> (raw)
In-Reply-To: <DKTQ1WGGZ7M4.2QHMYAK8CV79P@proxmox.com>
On 8/20/26 1:07 PM, Lukas Wagner wrote:
> On Tue Aug 18, 2026 at 3:25 PM CEST, Dominik Csapak wrote:
>> By rendering a small `Badge` after the nodename in the pve tree and the
>> resource tree, when the node is in ha maintenance mode.
>>
>> I opted for showing the ha state here differently than in PVE, because
>> seeing the online/offline state separately from the hastate can make
>> sense (so there is no ambiguity if the node is online or offline).
>>
>> To do this we have to add the hastate to the `PveNodeResource` and wire
>> that through from the /cluster/resources call.
>>
>> We also have to update the pwt-assets submodule to get the necessary CSS
>> classes for the badge.
>>
>> This partially fixes #7371.
>>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>> lib/pdm-api-types/src/resource.rs | 3 +++
>> server/src/api/resources.rs | 1 +
>> ui/pwt-assets | 2 +-
>> ui/src/pve/tree.rs | 11 +++++++++--
>> ui/src/renderer.rs | 14 +++++++++++++-
>> ui/src/widget/resource_tree.rs | 3 ++-
>> 6 files changed, 29 insertions(+), 5 deletions(-)
>>
>> diff --git a/lib/pdm-api-types/src/resource.rs b/lib/pdm-api-types/src/resource.rs
>> index c433a284..288d8543 100644
>> --- a/lib/pdm-api-types/src/resource.rs
>> +++ b/lib/pdm-api-types/src/resource.rs
>> @@ -490,6 +490,9 @@ pub struct PveNodeResource {
>> pub status: String,
>> /// Subscription level
>> pub level: String,
>> + /// HA State
>> + #[serde(default)]
>> + pub hastate: String,
>
> I wonder, could we use a proper type here? E.g. something like
>
> enum HaState {
> Maintenance,
> ...,
> Unknown
> }
sure, I'd like that too. I just adapted to the code around this^^
(e.g. the level and status field are similar strings)
>
> I'd also avoid carrying over these 'word amalgamations' and rather call
> it at least 'ha_state' (serialized to 'ha-state'), but not a biggie for
> me.
>
>> }
>
sure, i guess i was too fixated on keeping the fields the same
as the pve ones
next prev parent reply other threads:[~2026-08-20 11:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 13:25 [PATCH datacenter-manager v2 0/9] refactor and partially fix #7371 Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 1/9] lib: api types: add new ResourceView type and move accessors there Dominik Csapak
2026-08-20 11:07 ` Lukas Wagner
2026-08-20 11:20 ` Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 2/9] lib: api types: resource: add 'node' helper to ResourceView Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 3/9] lib: api types: add guest specific getter " Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 4/9] ui: pve: factor out the pve-manager version extraction Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 5/9] ui: renderer: use ResourceView for rendering Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 6/9] ui: pve: tree: reuse `PveResource` for `PveTreeNode` Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 7/9] ui: pve: show ha maintenance mode for nodes Dominik Csapak
2026-08-20 11:07 ` Lukas Wagner
2026-08-20 11:20 ` Dominik Csapak [this message]
2026-08-18 13:25 ` [PATCH datacenter-manager v2 8/9] ui: pve: node selector: show maintenance badge with node name Dominik Csapak
2026-08-18 13:25 ` [PATCH datacenter-manager v2 9/9] ui: pve: node: show HA maintenance badge Dominik Csapak
2026-08-20 11:08 ` [PATCH datacenter-manager v2 0/9] refactor and partially fix #7371 Lukas Wagner
2026-08-21 12:51 ` superseded: " Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebe59c8d-fcf1-41a5-b826-9d6892b90de8@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=l.wagner@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox