]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/StatStore.js
spam-info-grid: style the spam info grid via css variables
[pmg-gui.git] / js / StatStore.js
index a5e94e96bd02324496fd2fecac7c1c1a344ea7bd..0fc1d31c6c2a8b27b6ebfa264e33f1268afd62bb 100644 (file)
@@ -8,13 +8,17 @@ Ext.define('PMG.data.StatStore', {
 
     includeTimeSpan: false,
 
-    setUrl: function(url) {
+    setUrl: function(url, extraparam) {
        var me = this;
 
        me.proxy.abort(); // abort pending requests
 
        me.staturl = url;
        me.proxy.extraParams = {};
+       if (extraparam !== undefined) {
+           me.proxy.extraParams = extraparam;
+       }
+
        me.setData([]);
     },
 
@@ -38,7 +42,10 @@ Ext.define('PMG.data.StatStore', {
        }
 
        me.proxy.url = me.staturl;
-       me.proxy.extraParams = { starttime: ts.starttime, endtime: ts.endtime };
+       Ext.apply(me.proxy.extraParams, {
+           starttime: ts.starttime,
+           endtime: ts.endtime,
+       });
 
        var timespan = 3600;
        if (me.includeTimeSpan) {
@@ -55,7 +62,7 @@ Ext.define('PMG.data.StatStore', {
     },
 
     proxy: {
-       type: 'proxmox'
+       type: 'proxmox',
     },
 
     autoReload: true,
@@ -74,5 +81,5 @@ Ext.define('PMG.data.StatStore', {
        me.callParent([config]);
 
        me.reload();
-   }
+   },
 });