From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Dominik Csapak" <d.csapak@proxmox.com>, <pdm-devel@lists.proxmox.com>
Subject: Re: [PATCH datacenter-manager v3 7/9] ui: pve: show ha maintenance mode for nodes
Date: Fri, 28 Aug 2026 14:56:04 +0200 [thread overview]
Message-ID: <DL0LDBHADFXT.28GH983E5DMM3@proxmox.com> (raw)
In-Reply-To: <20260821123201.3035643-8-d.csapak@proxmox.com>
On Fri Aug 21, 2026 at 2:30 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 | 26 ++++++++++++++++++++++++++
> server/src/api/resources.rs | 1 +
> ui/pwt-assets | 2 +-
> ui/src/pve/tree.rs | 11 +++++++++--
> ui/src/renderer.rs | 19 +++++++++++++++++--
> ui/src/widget/resource_tree.rs | 3 ++-
> 6 files changed, 56 insertions(+), 6 deletions(-)
>
> diff --git a/lib/pdm-api-types/src/resource.rs b/lib/pdm-api-types/src/resource.rs
> index de2a93b4..29d70a3e 100644
> --- a/lib/pdm-api-types/src/resource.rs
> +++ b/lib/pdm-api-types/src/resource.rs
> @@ -477,6 +477,29 @@ pub struct PveLxcResource {
> pub vmid: u32,
> }
>
> +#[api]
> +#[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
> +#[serde(rename_all = "kebab-case")]
> +/// HA State of a PVE node.
> +pub enum PveNodeHaState {
> + /// The node is online and member of quorate partition
> + Online,
> + /// Node is a member of a quorate partition but in maintenance mode
> + Maintenance,
> + /// Not member of quorate partition, but possibly still running
> + Unknown,
> + /// Node needs to be fenced
> + Fence,
> + /// Node vanished from cluster member list
> + Gone,
> + /// Other (unknown) HA state
> + #[serde(untagged)]
> + Other(String),
> +}
> +
> +serde_plain::derive_display_from_serialize!(PveNodeHaState);
> +serde_plain::derive_fromstr_from_deserialize!(PveNodeHaState);
> +
> #[api]
> #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)]
> #[serde(rename_all = "kebab-case")]
> @@ -502,6 +525,9 @@ pub struct PveNodeResource {
> pub status: String,
> /// Subscription level
> pub level: String,
> + /// HA State
> + #[serde(default)]
This should probably also have skip_serializing_if = "Option::is_none"
next prev parent reply other threads:[~2026-08-28 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 12:30 [PATCH datacenter-manager v3 0/9] refactor and partially fix #7371 Dominik Csapak
2026-08-21 12:30 ` [PATCH datacenter-manager v3 1/9] lib: api types: add new ResourceView type and move accessors there Dominik Csapak
2026-08-21 12:30 ` [PATCH datacenter-manager v3 2/9] lib: api types: resource: add 'node' helper to ResourceView Dominik Csapak
2026-08-21 12:30 ` [PATCH datacenter-manager v3 3/9] lib: api types: add guest specific getter " Dominik Csapak
2026-08-21 12:30 ` [PATCH datacenter-manager v3 4/9] ui: pve: factor out the pve-manager version extraction Dominik Csapak
2026-08-21 12:30 ` [PATCH datacenter-manager v3 5/9] ui: renderer: use ResourceView for rendering Dominik Csapak
2026-08-21 12:30 ` [PATCH datacenter-manager v3 6/9] ui: pve: tree: reuse `PveResource` for `PveTreeNode` Dominik Csapak
2026-08-21 12:30 ` [PATCH datacenter-manager v3 7/9] ui: pve: show ha maintenance mode for nodes Dominik Csapak
2026-08-28 12:56 ` Lukas Wagner [this message]
2026-08-21 12:30 ` [PATCH datacenter-manager v3 8/9] ui: pve: node selector: show maintenance badge with node name Dominik Csapak
2026-08-28 12:55 ` Lukas Wagner
2026-08-21 12:30 ` [PATCH datacenter-manager v3 9/9] ui: pve: node: show ha maintenance badge Dominik Csapak
2026-08-28 13:24 ` [PATCH datacenter-manager v3 0/9] refactor and partially fix #7371 Lukas Wagner
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=DL0LDBHADFXT.28GH983E5DMM3@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=d.csapak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.