[pve-devel] applied: [PATCH manager] ui: node: lower statusStore interval outside of summary panel
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Apr 9 17:10:48 CEST 2020
We normally only use that information for the nodes power management
buttons, only the Summary panel profits from more frequent updates
(due to the uptime, and resource usage graphs).
So use 5s interval in general and switch to 1s for the summary panel
only.
This also fixes a bug where the node-config panel owned store got
stopped by mistake if the summary panel, which shared the use of that
store, was "destroyed" (left).
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
www/manager6/node/Config.js | 2 +-
www/manager6/node/Summary.js | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/www/manager6/node/Config.js b/www/manager6/node/Config.js
index f367827c..b5e6fd1a 100644
--- a/www/manager6/node/Config.js
+++ b/www/manager6/node/Config.js
@@ -16,7 +16,7 @@ Ext.define('PVE.node.Config', {
me.statusStore = Ext.create('Proxmox.data.ObjectStore', {
url: "/api2/json/nodes/" + nodename + "/status",
- interval: 1000
+ interval: 5000
});
var node_command = function(cmd) {
diff --git a/www/manager6/node/Summary.js b/www/manager6/node/Summary.js
index ccda0cad..69b18942 100644
--- a/www/manager6/node/Summary.js
+++ b/www/manager6/node/Summary.js
@@ -148,8 +148,15 @@ Ext.define('PVE.node.Summary', {
},
],
listeners: {
- activate: function() { rstore.startUpdate(); rrdstore.startUpdate(); },
- destroy: function() { rstore.stopUpdate(); rrdstore.stopUpdate(); }
+ activate: function() {
+ rstore.setInterval(1000);
+ rstore.startUpdate(); // just to be sure
+ rrdstore.startUpdate();
+ },
+ destroy: function() {
+ rstore.setInterval(5000); // don't stop it, it's not ours!
+ rrdstore.stopUpdate();
+ },
}
});
--
2.20.1
More information about the pve-devel
mailing list