[pve-devel] [PATCH manager 3/7] ui: dc/ACMEClusterView: use a diff/update store combo for the grids

Dominik Csapak d.csapak at proxmox.com
Thu May 7 10:27:09 CEST 2020


so that they are get automatically reloaded with the default interval (3seconds)

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this patch needs the widget-toolkit patches applied
we can of course leave those out, and to it manually in initComponent,
but this is a pattern we often use and maybe we can remove more manually
crated rstore/diffstore combos in other places

 www/manager6/dc/ACMEClusterView.js | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/www/manager6/dc/ACMEClusterView.js b/www/manager6/dc/ACMEClusterView.js
index 228d1cf9..00db8e9f 100644
--- a/www/manager6/dc/ACMEClusterView.js
+++ b/www/manager6/dc/ACMEClusterView.js
@@ -90,8 +90,15 @@ Ext.define('PVE.dc.ACMEAccountView', {
     },
 
     store: {
-	model: 'pve-acme-accounts',
-	autoLoad: true,
+	type: 'diff',
+	autoDestroy: true,
+	autoDestroyRstore: true,
+	rstore: {
+	    type: 'update',
+	    storeid: 'pve-acme-accounts',
+	    model: 'pve-acme-accounts',
+	    autoStart: true,
+	},
 	sorters: 'name',
     },
 });
@@ -179,9 +186,16 @@ Ext.define('PVE.dc.ACMEPluginView', {
     },
 
     store: {
-	model: 'pve-acme-plugins',
-	autoLoad: true,
-	filters: item => !!item.data.api,
+	type: 'diff',
+	autoDestroy: true,
+	autoDestroyRstore: true,
+	rstore: {
+	    type: 'update',
+	    storeid: 'pve-acme-plugins',
+	    model: 'pve-acme-plugins',
+	    autoStart: true,
+	    filters: item => !!item.data.api,
+	},
 	sorters: 'plugin',
     },
 });
-- 
2.20.1





More information about the pve-devel mailing list