public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH widget-toolkit] fix #8297: dns/time: reload the view after the editor closes
@ 2026-11-23 13:07 Kefu Chai
  2026-11-24  7:12 ` applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Kefu Chai @ 2026-11-23 13:07 UTC (permalink / raw)
  To: pve-devel

Both views override ObjectGrid's run_editor with their own, and that
silently drops the win.on('destroy', reload) the default one sets up,
so after saving, the panel keeps the old values until the next poll
comes around.

The DNS view used to poll every second, which hid this. Since the
interval went up to 10s in 2022, removing a DNS server looks like it
did nothing (#8297). The time view still polls every second, but it
has the same gap, so fix it there too.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
 src/node/DNSView.js  | 6 ++++--
 src/node/TimeView.js | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/node/DNSView.js b/src/node/DNSView.js
index 48030c2..0ebea22 100644
--- a/src/node/DNSView.js
+++ b/src/node/DNSView.js
@@ -13,12 +13,14 @@ Ext.define('Proxmox.node.DNSView', {
             throw 'no node name specified';
         }
 
-        let run_editor = () =>
-            Ext.create('Proxmox.node.DNSEdit', {
+        let run_editor = () => {
+            let win = Ext.create('Proxmox.node.DNSEdit', {
                 autoShow: true,
                 nodename: me.nodename,
                 deleteEmpty: me.deleteEmpty,
             });
+            win.on('destroy', me.reload, me);
+        };
 
         Ext.apply(me, {
             url: `/api2/json/nodes/${me.nodename}/dns`,
diff --git a/src/node/TimeView.js b/src/node/TimeView.js
index 92d203a..cb74585 100644
--- a/src/node/TimeView.js
+++ b/src/node/TimeView.js
@@ -15,11 +15,13 @@ Ext.define('Proxmox.node.TimeView', {
             return Ext.Date.format(servertime, 'Y-m-d H:i:s');
         };
 
-        let run_editor = () =>
-            Ext.create('Proxmox.node.TimeEdit', {
+        let run_editor = () => {
+            let win = Ext.create('Proxmox.node.TimeEdit', {
                 autoShow: true,
                 nodename: me.nodename,
             });
+            win.on('destroy', me.reload, me);
+        };
 
         Ext.apply(me, {
             url: `/api2/json/nodes/${me.nodename}/time`,
-- 
2.47.3





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

* applied: [PATCH widget-toolkit] fix #8297: dns/time: reload the view after the editor closes
  2026-11-23 13:07 [PATCH widget-toolkit] fix #8297: dns/time: reload the view after the editor closes Kefu Chai
@ 2026-11-24  7:12 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-11-24  7:12 UTC (permalink / raw)
  To: pve-devel, Kefu Chai

On Mon, 23 Nov 2026 21:07:38 +0800, Kefu Chai wrote:
> Both views override ObjectGrid's run_editor with their own, and that
> silently drops the win.on('destroy', reload) the default one sets up,
> so after saving, the panel keeps the old values until the next poll
> comes around.
> 
> The DNS view used to poll every second, which hid this. Since the
> interval went up to 10s in 2022, removing a DNS server looks like it
> did nothing (#8297). The time view still polls every second, but it
> has the same gap, so fix it there too.
> 
> [...]

Applied, thanks!

[1/1] fix #8297: dns/time: reload the view after the editor closes
      https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff;h=37c2ecc0a73b858e512d5126f3d26c5917627c2e




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

end of thread, other threads:[~2026-11-24  7:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 13:07 [PATCH widget-toolkit] fix #8297: dns/time: reload the view after the editor closes Kefu Chai
2026-11-24  7:12 ` applied: " Thomas Lamprecht

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