From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox Datacenter Manager development discussion
<pdm-devel@lists.proxmox.com>,
Shannon Sterz <s.sterz@proxmox.com>
Subject: Re: [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: datastore panel: disable content tab when datastore is offline
Date: Wed, 17 Dec 2025 14:23:50 +0100 [thread overview]
Message-ID: <52006e56-26f4-4268-b011-e1eef1f7cdd8@proxmox.com> (raw)
In-Reply-To: <20251216143856.302676-3-s.sterz@proxmox.com>
LGTM, makes only sense to apply once pwt is bumped with the fix for the
tabbaritem
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
On 12/16/25 3:39 PM, Shannon Sterz wrote:
> and show a tooltip explaining why.
>
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
> ui/src/pbs/datastore.rs | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/ui/src/pbs/datastore.rs b/ui/src/pbs/datastore.rs
> index 274c6ef..878c1b8 100644
> --- a/ui/src/pbs/datastore.rs
> +++ b/ui/src/pbs/datastore.rs
> @@ -45,6 +45,13 @@ impl Component for DatastorePanelComp {
>
> fn view(&self, ctx: &yew::Context<Self>) -> yew::Html {
> let props = ctx.props();
> + let offline = props
> + .config
> + .maintenance_mode
> + .as_ref()
> + .map(|v| v == "offline")
> + .unwrap_or_default();
> +
> pwt::widget::TabPanel::new()
> .router(true)
> .class(FlexFit)
> @@ -64,6 +71,15 @@ impl Component for DatastorePanelComp {
> TabBarItem::new()
> .key("content")
> .label(tr!("Content"))
> + .disabled(offline)
> + .tip(
> + offline.then_some(
> + tr!(
> + "Not available if the datastore is in maintenance mode \"offline\"."
> + )
> + .into(),
> + ),
> + )
> .icon_class("fa fa-th"),
> {
> let remote = props.remote.clone();
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
prev parent reply other threads:[~2025-12-17 13:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 14:38 [pdm-devel] [PATCH datacenter-manager/yew-widget-toolkit v2 0/2] disable content tab on pbs datastores when they are in maintenance mode "offline" Shannon Sterz
2025-12-16 14:38 ` [pdm-devel] [PATCH yew-widget-toolkit v2 1/1] tab bar: make `TabBarItem::tip` work as intended Shannon Sterz
2025-12-17 13:21 ` [pdm-devel] applied: " Dominik Csapak
2025-12-16 14:38 ` [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: datastore panel: disable content tab when datastore is offline Shannon Sterz
2025-12-17 13:23 ` Dominik Csapak [this message]
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=52006e56-26f4-4268-b011-e1eef1f7cdd8@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
--cc=s.sterz@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.