From: Christian Ebner <c.ebner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] ui: indicate s3 datastores in overview and show endpoint id
Date: Tue, 4 Nov 2025 15:49:04 +0100 [thread overview]
Message-ID: <20251104144905.582920-4-c.ebner@proxmox.com> (raw)
In-Reply-To: <20251104144905.582920-1-c.ebner@proxmox.com>
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@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
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-11-04 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 14:49 [pdm-devel] [PATCH proxmox{, -datacenter-manager} 0/4] show dedicated datastore icons in tree view and removable/s3 backend info in overview Christian Ebner
2025-11-04 14:49 ` [pdm-devel] [PATCH proxmox 1/1] pbs-api-types: extend datastore config by backend config parser helper Christian Ebner
2025-11-04 14:49 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] ui: indicate removable datastore in overview and show backing device Christian Ebner
2025-11-04 14:49 ` Christian Ebner [this message]
2025-11-04 14:49 ` [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] ui: datastore tree: indicate datastore type by different icons Christian Ebner
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=20251104144905.582920-4-c.ebner@proxmox.com \
--to=c.ebner@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