all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager/proxmox-geojson-data/yew-widget-toolkit/yew-widget-toolkit-assets v3 00/11] add a new map widget for custom views
@ 2026-05-22  8:33 Dominik Csapak
  2026-05-22  8:33 ` [PATCH yew-widget-toolkit v3 1/3] js-helper: add client-to-svg-coordinate conversion helper Dominik Csapak
                   ` (13 more replies)
  0 siblings, 14 replies; 19+ messages in thread
From: Dominik Csapak @ 2026-05-22  8:33 UTC (permalink / raw)
  To: pdm-devel

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)

Locations are now taken from PVE/PBS themselves and are cached.
I chose 24 hours as default max-age for the cache for now, but we might
want to increase that to something even higher (maybe a month?).
There is also currently no mechanism that updates the location in the background
automatically, but this can be done in the next version or as a followup
if we can agree on a sensible interval for that. (I'd suggest once a week
or something like that?)

The api call falls always back to the entry in the cache (regardless of age)
if the fetching returns an error, so that the map is always filled with
data if we have it.

This is done since we can assume that most servers won't move around so once
we have the location, this won't change.

If there is a differing opinion or suggestion on any of that, please do tell.

NOTE: the proxmox-geojson-data does not contain the sources yet since it's
too big to send as a patch, so one has to do a 'make natural-earth' there and
commit the shx/shp files once.

changes from v2:
* split the world map out to own repository
* use location stored in pve/pbs instead in the pdm remotes
  (this accounts for most of the changes)
* some smaller fixes, e.g. the map will now zoom to the points if the
  points list changes from empty to non-empty

changes from v1:
* don't include world-map.json file in commit
* fixed an issue with the wrong property name for the remote location in the ui

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       | 553 +++++++++++++++++++++++++++++
 src/widget/charts/map/zoom_info.rs | 193 ++++++++++
 src/widget/charts/mod.rs           |   9 +
 src/widget/charts/world_map.rs     | 219 ++++++++++++
 8 files changed, 1103 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 | 64 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)


proxmox-geojson-data:

Dominik Csapak (1):
  initial commit


proxmox-datacenter-manager:

Dominik Csapak (6):
  server: pbs client: add node_config method
  lib/api: add 'location-info' api call with cached information
  lib/api: add new 'remote-list' info to the resource status
  server: serve geojson worldmap
  ui: views: refactor required api call info into struct
  ui: views: add map component

 debian/control                                |   1 +
 lib/pdm-api-types/src/lib.rs                  |  34 ++
 lib/pdm-api-types/src/resource.rs             |  51 +++
 lib/pdm-api-types/src/views.rs                |   2 +
 server/src/api/resources.rs                   | 159 +++++--
 server/src/bin/proxmox-datacenter-api/main.rs |   1 +
 server/src/lib.rs                             |   1 +
 server/src/location_cache.rs                  | 160 +++++++
 server/src/pbs_client.rs                      |   6 +
 ui/Cargo.toml                                 |   1 +
 ui/Trunk.toml                                 |   5 +
 ui/debian/control                             |   1 +
 ui/src/dashboard/map.rs                       | 406 ++++++++++++++++++
 ui/src/dashboard/mod.rs                       |   3 +
 ui/src/dashboard/view.rs                      |  76 +++-
 ui/src/dashboard/view/row_view.rs             |   1 +
 16 files changed, 863 insertions(+), 45 deletions(-)
 create mode 100644 server/src/location_cache.rs
 create mode 100644 ui/src/dashboard/map.rs


Summary over all repositories:
  25 files changed, 2030 insertions(+), 45 deletions(-)

-- 
Generated by git-murpp 0.8.1




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-05-24  2:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22  8:33 [PATCH datacenter-manager/proxmox-geojson-data/yew-widget-toolkit/yew-widget-toolkit-assets v3 00/11] add a new map widget for custom views Dominik Csapak
2026-05-22  8:33 ` [PATCH yew-widget-toolkit v3 1/3] js-helper: add client-to-svg-coordinate conversion helper Dominik Csapak
2026-05-22  8:33 ` [PATCH yew-widget-toolkit v3 2/3] widget: charts: add interactive Map with zoom/pan and clustering Dominik Csapak
2026-05-22 13:30   ` Shannon Sterz
2026-05-22  8:33 ` [PATCH yew-widget-toolkit v3 3/3] widget: charts: add WorldMap with GeoJSON rendering Dominik Csapak
2026-05-22  8:34 ` [PATCH yew-widget-toolkit-assets v3 1/1] charts: add necessary classes for Map Dominik Csapak
2026-05-22  8:34 ` [PATCH proxmox-geojson-data v3 1/1] initial commit Dominik Csapak
2026-05-22 13:30   ` Shannon Sterz
2026-05-22  8:34 ` [PATCH datacenter-manager v3 1/6] server: pbs client: add node_config method Dominik Csapak
2026-05-22  8:34 ` [PATCH datacenter-manager v3 2/6] lib/api: add 'location-info' api call with cached information Dominik Csapak
2026-05-22 13:30   ` Shannon Sterz
2026-05-22  8:34 ` [PATCH datacenter-manager v3 3/6] lib/api: add new 'remote-list' info to the resource status Dominik Csapak
2026-05-22  8:34 ` [PATCH datacenter-manager v3 4/6] server: serve geojson worldmap Dominik Csapak
2026-05-22  8:34 ` [PATCH datacenter-manager v3 5/6] ui: views: refactor required api call info into struct Dominik Csapak
2026-05-22  8:34 ` [PATCH datacenter-manager v3 6/6] ui: views: add map component Dominik Csapak
2026-05-22 13:30   ` Shannon Sterz
2026-05-22  9:38 ` [PATCH datacenter-manager/proxmox-geojson-data/yew-widget-toolkit/yew-widget-toolkit-assets v3 00/11] add a new map widget for custom views Thomas Lamprecht
2026-05-22 13:33 ` Shannon Sterz
2026-05-24  2:31 ` applied: " Thomas Lamprecht

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