From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id DBAE01FF139 for ; Tue, 24 Feb 2026 12:42:05 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2C11D6D6A; Tue, 24 Feb 2026 12:43:01 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 24 Feb 2026 12:42:27 +0100 Message-Id: To: "Dominik Csapak" Subject: Re: [pdm-devel] [PATCH datacenter-manager v2 1/1] ui: datastore panel: disable content tab when datastore is offline X-Mailer: aerc 0.20.0 References: <20251216143856.302676-1-s.sterz@proxmox.com> <20251216143856.302676-3-s.sterz@proxmox.com> <52006e56-26f4-4268-b011-e1eef1f7cdd8@proxmox.com> In-Reply-To: <52006e56-26f4-4268-b011-e1eef1f7cdd8@proxmox.com> From: "Shannon Sterz" X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1771933332030 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.089 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6KGH4EKXREQXKCVNAN5LR53EZ226RXTC X-Message-ID-Hash: 6KGH4EKXREQXKCVNAN5LR53EZ226RXTC X-MailFrom: s.sterz@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Proxmox Datacenter Manager development discussion X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 > Tested-by: Dominik Csapak ping, still applies, would be a nice addition i think :) > On 12/16/25 3:39 PM, Shannon Sterz wrote: >> and show a tooltip explaining why. >> >> Signed-off-by: Shannon Sterz >> --- >> 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) -> yew::Html { >> let props =3D ctx.props(); >> + let offline =3D props >> + .config >> + .maintenance_mode >> + .as_ref() >> + .map(|v| v =3D=3D "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 m= aintenance mode \"offline\"." >> + ) >> + .into(), >> + ), >> + ) >> .icon_class("fa fa-th"), >> { >> let remote =3D props.remote.clone();