all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager/yew-widget-toolkit/yew-widget-toolkit-assets 0/8] add a new map widget for custom views
Date: Mon,  4 May 2026 14:44:47 +0200	[thread overview]
Message-ID: <20260504124515.2956574-1-d.csapak@proxmox.com> (raw)

This series let's users add location info to remotes (longitude,latitude) and
makes it possible to show them on a map in a custom view.

This map is interactive, so it let's you zoom/pan/etc. (with touch controls too)

It also adds new status info per remote to the resources status api call
so we can show some sensible info on the map (success/warn/error).

For now this is very basic only, but we can extend that in the future by e.g.,
adding a health call for each remote and including this info here.

The source map data is from naturalearthdata.com (data is in the public domain)
and is converted to geojson with 'ogr2ogr' (small script is included)

I used the lowest resolution data which results in a ~350K json (~130K zipped)
which should work in most scenarios (e.g. cpu perf on mid-tier mobiles)

naming/location of api data and configs is open for debate, I'm not really
sure if I found the right places, but they seemed to work out ok.

proxmox-yew-widget-toolkit:

Dominik Csapak (3):
  js-helper: add client-to-svg-coordinate conversion helper
  widget: charts: add interactive Map with zoom/pan and clustering
  widget: charts: add WorldMap with GeoJSON rendering

 Cargo.toml                         |   1 +
 js-helper-module.js                |   7 +
 src/lib.rs                         |   5 +
 src/widget/charts/map/map_point.rs | 116 +++++++
 src/widget/charts/map/mod.rs       | 537 +++++++++++++++++++++++++++++
 src/widget/charts/map/zoom_info.rs | 192 +++++++++++
 src/widget/charts/mod.rs           |   9 +
 src/widget/charts/world_map.rs     | 219 ++++++++++++
 8 files changed, 1086 insertions(+)
 create mode 100644 src/widget/charts/map/map_point.rs
 create mode 100644 src/widget/charts/map/mod.rs
 create mode 100644 src/widget/charts/map/zoom_info.rs
 create mode 100644 src/widget/charts/world_map.rs


proxmox-yew-widget-toolkit-assets:

Dominik Csapak (1):
  charts: add necessary classes for Map

 scss/_charts.scss | 63 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)


proxmox-datacenter-manager:

Dominik Csapak (4):
  lib/api/ui: add location property to remote config
  lib/api: add new 'remote-list' info to the resource status
  ui: add world map geojson data and update script
  ui: views: add map component

 lib/pdm-api-types/src/remotes.rs  |  22 ++-
 lib/pdm-api-types/src/resource.rs |  49 ++++++
 lib/pdm-api-types/src/views.rs    |   2 +
 server/src/api/pbs/mod.rs         |   2 +
 server/src/api/pve/mod.rs         |   2 +
 server/src/api/remotes/mod.rs     |   9 +
 server/src/api/resources.rs       |  38 +++-
 ui/Cargo.toml                     |   1 +
 ui/Makefile                       |   6 +-
 ui/index.html                     |   1 +
 ui/src/dashboard/map.rs           | 281 ++++++++++++++++++++++++++++++
 ui/src/dashboard/mod.rs           |   3 +
 ui/src/dashboard/view.rs          |  10 +-
 ui/src/dashboard/view/row_view.rs |   1 +
 ui/src/remotes/edit_remote.rs     |  34 +++-
 ui/update-world-map.sh            |  15 ++
 ui/world-map.json                 |   9 +
 17 files changed, 468 insertions(+), 17 deletions(-)
 create mode 100644 ui/src/dashboard/map.rs
 create mode 100755 ui/update-world-map.sh
 create mode 100644 ui/world-map.json


Summary over all repositories:
  26 files changed, 1617 insertions(+), 17 deletions(-)

-- 
Generated by git-murpp 0.8.1




             reply	other threads:[~2026-05-04 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 12:44 Dominik Csapak [this message]
2026-05-04 12:44 ` [PATCH yew-widget-toolkit 1/3] js-helper: add client-to-svg-coordinate conversion helper Dominik Csapak
2026-05-04 12:44 ` [PATCH yew-widget-toolkit 2/3] widget: charts: add interactive Map with zoom/pan and clustering Dominik Csapak
2026-05-04 12:44 ` [PATCH yew-widget-toolkit 3/3] widget: charts: add WorldMap with GeoJSON rendering Dominik Csapak
2026-05-04 12:44 ` [PATCH yew-widget-toolkit-assets 1/1] charts: add necessary classes for Map Dominik Csapak
2026-05-04 12:44 ` [PATCH datacenter-manager 1/4] lib/api/ui: add location property to remote config Dominik Csapak
2026-05-04 12:44 ` [PATCH datacenter-manager 2/4] lib/api: add new 'remote-list' info to the resource status Dominik Csapak
2026-05-04 12:44 ` [PATCH datacenter-manager 4/4] ui: views: add map component Dominik Csapak
2026-05-04 12:49 ` [PATCH datacenter-manager/yew-widget-toolkit/yew-widget-toolkit-assets 0/8] add a new map widget for custom views Dominik Csapak
2026-05-05  8:28   ` Thomas Lamprecht
2026-05-05  8:39     ` Dominik Csapak
2026-05-05  8:51       ` Thomas Lamprecht
2026-05-05  7:38 ` superseded: " Dominik Csapak

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=20260504124515.2956574-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal