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 8471B1FF142 for ; Fri, 22 May 2026 15:31:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DF37DC11E; Fri, 22 May 2026 15:31:16 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 22 May 2026 15:30:41 +0200 Message-Id: Subject: Re: [PATCH datacenter-manager v3 6/6] ui: views: add map component To: "Dominik Csapak" , X-Mailer: aerc 0.20.0 References: <20260522083412.1223719-1-d.csapak@proxmox.com> <20260522083412.1223719-12-d.csapak@proxmox.com> In-Reply-To: <20260522083412.1223719-12-d.csapak@proxmox.com> From: "Shannon Sterz" X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779456622609 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.113 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 Message-ID-Hash: CWSXJQQLVUCUN5RQEL75M3ATYR4WW2JV X-Message-ID-Hash: CWSXJQQLVUCUN5RQEL75M3ATYR4WW2JV X-MailFrom: s.sterz@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: On Fri May 22, 2026 at 10:34 AM CEST, Dominik Csapak wrote: > this uses the WorldMap from yew widget toolkit together with the added > world-map.json to show a world map on a custom view. This shows the > remotes which have a location in the config and their status. > > Signed-off-by: Dominik Csapak -->8 snip 8<-- > @@ -251,7 +256,27 @@ impl ViewComp { > link.send_message(Msg::LoadingResult(LoadingResult::= SubscriptionInfo(res))); > }; > > - join!(status_future, entities_future, tasks_future, subs= _future); > + let location_future =3D async { > + if required.locations { > + let mut params =3D json!({}); > + // max-age for location has a sensible backend d= efault and does not need to be > + // updated as often, except if forced > + if max_age =3D=3D 0 { > + params["max-age"] =3D 0.into(); > + } > + add_view_filter(&mut params); > + let res =3D http_get("/resources/location-info",= Some(params)).await; > + link.send_message(Msg::LoadingResult(LoadingResu= lt::Locations(res))); > + } > + }; > + > + join!( > + status_future, > + entities_future, > + tasks_future, > + subs_future, > + location_future > + ); imo it might worth revisiting the approach i suggest for this last year before we shipped the views [1]. otherwise, this will just create more and more churn as we go on. i'll see that i can get around to this after the release. [1]: https://lore.proxmox.com/pdm-devel/DDQH4208RAP8.28R3YO54Z8UX2@proxmox.= com/ -->8 snip 8<--