From: "Shannon Sterz" <s.sterz@proxmox.com>
To: "Dominik Csapak" <d.csapak@proxmox.com>
Cc: Proxmox Datacenter Manager development discussion
<pdm-devel@lists.proxmox.com>
Subject: Re: [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: datastore panel: disable content tab when datastore is offline
Date: Fri, 19 Dec 2025 12:27:24 +0100 [thread overview]
Message-ID: <DF25O59UQU95.KBFQZOSJCKMS@proxmox.com> (raw)
In-Reply-To: <52006e56-26f4-4268-b011-e1eef1f7cdd8@proxmox.com>
On Wed Dec 17, 2025 at 2:23 PM CET, Dominik Csapak wrote:
> 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>
ping, pwt has been bumped so nothing should be holding this up now
>
> 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-19 11:27 UTC|newest]
Thread overview: 6+ 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
2025-12-19 11:27 ` Shannon Sterz [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=DF25O59UQU95.KBFQZOSJCKMS@proxmox.com \
--to=s.sterz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox