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] ui: views: map: fix force reload of location data
Date: Tue, 26 May 2026 11:35:53 +0200	[thread overview]
Message-ID: <20260526093615.1433585-1-d.csapak@proxmox.com> (raw)

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





             reply	other threads:[~2026-05-26  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26  9:35 Dominik Csapak [this message]
2026-05-26 11:24 ` applied: [PATCH datacenter-manager] ui: views: map: fix force reload of location data Lukas Wagner

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=20260526093615.1433585-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