[pdm-devel] [PATCH datacenter-manager v2 1/1] ui: datastore panel: disable content tab when datastore is offline

Shannon Sterz s.sterz at proxmox.com
Tue Dec 16 15:38:56 CET 2025


and show a tooltip explaining why.

Signed-off-by: Shannon Sterz <s.sterz at 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();
-- 
2.47.3





More information about the pdm-devel mailing list