[icinga-checkins] icinga.org: icinga-web/master: Fixed additionalFilters being ignored

git at icinga.org git at icinga.org
Mon Aug 27 16:19:50 CEST 2012


Module: icinga-web
Branch: master
Commit: ff5e79cde364fd516c55adc29720cc661401b163
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=ff5e79cde364fd516c55adc29720cc661401b163

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Mon Aug 27 16:19:33 2012 +0200

Fixed additionalFilters being ignored

---

 .../Cronks/lib/js/Cronk/grid/MetaGridPanel.js      |   29 +++----------------
 1 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js b/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
index 282e815..20220e9 100644
--- a/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
+++ b/app/modules/Cronks/lib/js/Cronk/grid/MetaGridPanel.js
@@ -394,7 +394,6 @@ Ext.ns("Cronk.grid");
                     sortable: (field.order.enabled ? true : false),
                     hidden: (field.display.visible ? false : true)
                 });
-
                 if (field.display.width) {
                     columns[i - 1].width = field.display.width;
                 }
@@ -617,7 +616,7 @@ Ext.ns("Cronk.grid");
                 }
             });
 
-            Ext.iterate(this.getOption("template.option.filter", []), function (v, k) {
+            Ext.iterate(this.getOption("template.option.filter", []), function (k, v) {
                 if (v.enabled === true && v.type === 'extjs') {
                     var f = v;
                     f.name = (f.name ? f.name : k);
@@ -689,8 +688,8 @@ Ext.ns("Cronk.grid");
             cHandler.setGrid(this);
 
             // Where we can get some info
-            cHandler.setInfoUrl(AppKit.c.path + "/modules/cronks/commandproc/{0}/json/inf");
-            cHandler.setSendUrl(AppKit.c.path + "/modules/cronks/commandproc/{0}/json/send");
+            cHandler.setInfoUrl("/icinga-web/modules/cronks/commandproc/{0}/json/inf");
+            cHandler.setSendUrl("/icinga-web/modules/cronks/commandproc/{0}/json/send");
 
             // We need something to click on
             cHandler.enhanceToolbar();
@@ -965,9 +964,9 @@ Ext.ns("Cronk.grid");
          * @return {Object}
          */
         getState: function () {
+
             var store = this.getStore();
             var aR = null;
-            
             if (this.autoRefreshEnabled === true) {
                 aR = 1;
             }
@@ -975,7 +974,6 @@ Ext.ns("Cronk.grid");
             if (this.autoRefreshEnabled === false) {
                 aR = -1;
             }
-            
             var o = {
                 nativeState: Ext.grid.GridPanel.prototype.getState.apply(this),
                 filter_params: this.filter_params || {},
@@ -987,7 +985,6 @@ Ext.ns("Cronk.grid");
                 autoRefresh: aR,
                 connection: this.store.baseParams.connection
             };
-            
             return o;
         },
 
@@ -1073,35 +1070,19 @@ Ext.ns("Cronk.grid");
         /**
          * Add persistent parameters to the data store to be reload safe
          * @param {Object} params
-         * @param {Boolean} persist
          */
-        applyParamsToStore: function (params, persist) {
-            
-            persist = persist || false;
-            
+        applyParamsToStore: function (params) {
             for (var i in params) {
                 if (i) {
                     if (i === "connection") {
                         this.setConnection(params[i]);
                     }
                     this.store.setBaseParam(i, params[i]);
-                    
-                    if (persist === true) {
-                        this.store.originParams[i] = params[i];
-                    }
                 }
             }
         },
         
         /**
-         * Apply persistent params to store
-         * @param {Object} params
-         */
-        applyPersistentParamsToStore: function(params) {
-            this.applyParamsToStore(params, true);
-        },
-        
-        /**
          * @private
          * Get global events and add then to the toolbar
          */





More information about the icinga-checkins mailing list