[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
Fri Dec 19 12:27:24 CET 2025


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 at proxmox.com>
> Tested-by: Dominik Csapak <d.csapak at 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 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();





More information about the pdm-devel mailing list