From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 492F81FF142 for ; Tue, 05 May 2026 09:32:45 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E68F3182C1; Tue, 5 May 2026 09:32:44 +0200 (CEST) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager v2 3/4] ui: add world map geojson update script Date: Tue, 5 May 2026 09:31:58 +0200 Message-ID: <20260505073203.398548-8-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260505073203.398548-1-d.csapak@proxmox.com> References: <20260505073203.398548-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.050 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com,readme.md,update-world-map.sh,naturalearthdata.com] Message-ID-Hash: OVD2BG76U22J5L4B3RSN6JMW7PSAZDU4 X-Message-ID-Hash: OVD2BG76U22J5L4B3RSN6JMW7PSAZDU4 X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: the data source is natural earth[0] which is in the public domain. It's also maintained on github[1] which is used for the update script. include a small script to convert the shapefile to the necessary geojson file with 'ogr2ogr' from the `gdal-bin` package. It's not added as a dev-dependency, since it should not update often. (last update of this data was in 2018 so ~6 years ago) Signed-off-by: Dominik Csapak --- changes from v1: * don't include the map data itself * use github to download the files and generate the world-map.json file ui/Makefile | 6 ++++-- ui/index.html | 1 + ui/update-world-map.sh | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100755 ui/update-world-map.sh diff --git a/ui/Makefile b/ui/Makefile index 403f6d55..6562ae5e 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -51,7 +51,7 @@ dist/pdm-ui_bg.wasm.gz: dist/pdm-ui_bg.wasm dist/%.css: css/%.scss dist rust-grass $< $@ -install: $(COMPILED_OUTPUT) index.hbs +install: $(COMPILED_OUTPUT) index.hbs world-map.json install -dm0755 $(DESTDIR)$(UIDIR) install -dm0755 $(DESTDIR)$(UIDIR)/js @@ -76,6 +76,8 @@ install: $(COMPILED_OUTPUT) index.hbs install -m0644 dist/material-yew-style.css $(DESTDIR)$(UIDIR) install -m0644 dist/desktop-yew-style.css $(DESTDIR)$(UIDIR) + install -m0644 world-map.json $(DESTDIR)$(UIDIR) + .PHONY: submodule submodule: test -f "pwt-assets/README.md" || git submodule update --init @@ -83,7 +85,7 @@ submodule: $(BUILDDIR): submodule rm -rf $@ $@.tmp mkdir -p $@.tmp/ui - cp -a debian/ src/ pwt-assets/ images/ css/ index.hbs Makefile Cargo.toml $@.tmp/ui + cp -a debian/ src/ pwt-assets/ images/ css/ index.hbs world-map.json Makefile Cargo.toml $@.tmp/ui cp -a ../Cargo.toml ../lib $@.tmp/ echo "git clone git://git.proxmox.com/git/$(PACKAGE).git\\ngit checkout $$(git rev-parse HEAD)" \ > $@.tmp/ui/debian/SOURCE diff --git a/ui/index.html b/ui/index.html index 6b81f7d8..48256a67 100644 --- a/ui/index.html +++ b/ui/index.html @@ -12,6 +12,7 @@ +