public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [RFC PATCH datacenter-manager] ui: views: map: add hint for map data source
Date: Tue, 26 May 2026 14:52:07 +0200	[thread overview]
Message-ID: <20260526125308.3034998-1-d.csapak@proxmox.com> (raw)

It's not strictly necessary, as the map data is in the public domain,
but it's probably a good idea to show users where the map data comes
from.

Suggested-by: Shannon Sterz <s.sterz@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
sending as RFC because I'm not sure if we want this so prominently.

 ui/css/pdm.scss         |  7 +++++++
 ui/src/dashboard/map.rs | 13 +++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/ui/css/pdm.scss b/ui/css/pdm.scss
index 549c006f..e2a70796 100644
--- a/ui/css/pdm.scss
+++ b/ui/css/pdm.scss
@@ -155,3 +155,10 @@
 .dragging-item {
     opacity: 0.5;
 }
+
+.pdm-map-hint {
+    position: absolute;
+    right: 0px;
+    bottom: 0px;
+    padding: var(--pwt-spacer-1);
+}
diff --git a/ui/src/dashboard/map.rs b/ui/src/dashboard/map.rs
index df13b605..b98ffb3b 100644
--- a/ui/src/dashboard/map.rs
+++ b/ui/src/dashboard/map.rs
@@ -186,10 +186,19 @@ impl yew::Component for DashboardMapComp {
             _ => return loading_column().into(),
         };
 
-        WorldMap::new(geojson)
+        let map = WorldMap::new(geojson)
+            .class(css::FlexFit)
+            .points(self.points.clone());
+
+        let link = "<a href='https://www.naturalearthdata.com' rel='noreferrer' target='_blank'>naturalearthdata.com</a>";
+        let text = tr!("Map data from {0}", link);
+
+        Container::new()
             .with_std_props(&props.std_props)
             .listeners(&props.listeners)
-            .points(self.points.clone())
+            .class(css::Display::Flex)
+            .with_child(map)
+            .with_child(span(Html::from_html_unchecked(text.into())).class("pdm-map-hint"))
             .into()
     }
 }
-- 
2.47.3





                 reply	other threads:[~2026-05-26 12:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260526125308.3034998-1-d.csapak@proxmox.com \
    --to=d.csapak@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal