[pdm-devel] [PATCH proxmox-datacenter-manager 2/3] ui: indicate s3 datastores in overview and show endpoint id

Christian Ebner c.ebner at proxmox.com
Tue Nov 4 15:49:04 CET 2025


Allows to identify datastores with s3 backend and the used endpoint
id from the datastore overview.

If parsing fails, fallback to the default backend in lack of
alternatives.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
 ui/src/pbs/datastore/overview.rs | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/ui/src/pbs/datastore/overview.rs b/ui/src/pbs/datastore/overview.rs
index 264ea36..abb46f1 100644
--- a/ui/src/pbs/datastore/overview.rs
+++ b/ui/src/pbs/datastore/overview.rs
@@ -1,7 +1,7 @@
 use std::rc::Rc;
 
 use gloo_timers::callback::Timeout;
-use pbs_api_types::DataStoreConfig;
+use pbs_api_types::{DataStoreConfig, DatastoreBackendType};
 use yew::{
     virtual_dom::{VComp, VNode},
     Properties,
@@ -179,6 +179,11 @@ impl yew::Component for DataStoreOverviewComp {
 
     fn view(&self, ctx: &yew::Context<Self>) -> yew::Html {
         let props = ctx.props();
+        let backend_config = props.config.parse_backend_config().unwrap_or_default();
+        let backend_s3 = match backend_config.ty.unwrap_or_default() {
+            DatastoreBackendType::Filesystem => None,
+            DatastoreBackendType::S3 => Some(backend_config.client.unwrap_or_default()),
+        };
 
         // TODO get current status via API and show usage, etc.
 
@@ -214,6 +219,11 @@ impl yew::Component for DataStoreOverviewComp {
                         StatusRow::new(tr!("Removable"))
                             .icon_class("fa fa-fw fa-plug")
                             .status(tr!("backing device UUID: {0}", uuid))
+                    }))
+                    .with_optional_child(backend_s3.map(|endpoint| {
+                        StatusRow::new(tr!("S3"))
+                            .icon_class("fa fa-fw fa-cloud-upload")
+                            .status(tr!("using endpoint: {0}", endpoint))
                     })),
             )
             .with_child(separator().padding_x(4))
-- 
2.47.3





More information about the pdm-devel mailing list