public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager] ui: views: map: fix force reload of location data
@ 2026-05-26  9:35 Dominik Csapak
  2026-05-26 11:24 ` applied: " Lukas Wagner
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2026-05-26  9:35 UTC (permalink / raw)
  To: pdm-devel

we don't use 'max-age = 0' for a force refresh (when a user clicks the
refresh button). Instead we use FORCE_RELOAD_MAX_AGE_S, so use that
instead to gate the max-age property.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 ui/src/dashboard/view.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/src/dashboard/view.rs b/ui/src/dashboard/view.rs
index a654d1be..76e75e2c 100644
--- a/ui/src/dashboard/view.rs
+++ b/ui/src/dashboard/view.rs
@@ -261,8 +261,8 @@ impl ViewComp {
                         let mut params = json!({});
                         // max-age for location has a sensible backend default and does not need to be
                         // updated as often, except if forced
-                        if max_age == 0 {
-                            params["max-age"] = 0.into();
+                        if max_age <= FORCE_RELOAD_MAX_AGE_S {
+                            params["max-age"] = max_age.into();
                         }
                         add_view_filter(&mut params);
                         let res = http_get("/resources/location-info", Some(params)).await;
-- 
2.47.3





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

end of thread, other threads:[~2026-05-26 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26  9:35 [PATCH datacenter-manager] ui: views: map: fix force reload of location data Dominik Csapak
2026-05-26 11:24 ` applied: " Lukas Wagner

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