[icinga-checkins] icinga.org: icinga-web/master: * Load group data from group inheritance view (fixes #2370)

git at icinga.org git at icinga.org
Wed Feb 29 16:40:45 CET 2012


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Wed Feb 29 16:40:09 2012 +0100

* Load group data from group inheritance view (fixes #2370)

---

 .../lib/js/admin/components/RoleListingGrid.js     |   32 ++++++++++----------
 .../AppKit/lib/js/icinga/api/RESTFilterComboBox.js |    2 +-
 doc/CHANGELOG-1.6                                  |    1 +
 3 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js b/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
index 87601af..d778ed3 100644
--- a/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
+++ b/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
@@ -24,6 +24,22 @@ AppKit.Admin.Components.RoleListingGrid = Ext.extend(Ext.grid.GridPanel,{
     	this.store.on('load', function(store, records, o) {
     		this.counterLabel.update([store.getCount()]);
     	}, this);
+    	
+    	var model = this.getSelectionModel();
+    	if (model) {
+    	    /*
+    	     * Before this was bound to rowclick event. If we trigger injected selection
+    	     * rowclick was never fired, bind to rowselect is the better choice I think
+    	     */
+    	    model.on('rowselect', function(sm, rowIndex, r) {
+    	        var id = this.getStore().getAt(rowIndex).get("id");
+                Ext.getCmp('roleEditor').setDisabled(false);
+                Ext.getCmp('btn-save-group').setText(_('Save'));
+                Ext.getCmp('btn-save-group').setIconClass('icinga-icon-disk');
+                Ext.getCmp('progressbar-field').setValue();
+                AppKit.Admin.RoleEditForm.bindRole(id, this.roleProviderURI);
+    	    }, this);
+    	}
     },
     
     deleteSelected: function() {
@@ -101,22 +117,6 @@ AppKit.Admin.Components.RoleListingGrid = Ext.extend(Ext.grid.GridPanel,{
         }]
 
     },
-   
-    
-
-    listeners: {
-        rowclick: function(grid,index,_e) {
-            var id = grid.getStore().getAt(index).get("id");
-            Ext.getCmp('roleEditor').setDisabled(false);
-            Ext.getCmp('btn-save-group').setText(_('Save'));
-            Ext.getCmp('btn-save-group').setIconClass('icinga-icon-disk');
-            Ext.getCmp('progressbar-field').setValue();
-            AppKit.Admin.RoleEditForm.bindRole(id, grid.roleProviderURI);									
-        }
-      
-
-    },
-
 
     colModel: new Ext.grid.ColumnModel({
         defaults: {
diff --git a/app/modules/AppKit/lib/js/icinga/api/RESTFilterComboBox.js b/app/modules/AppKit/lib/js/icinga/api/RESTFilterComboBox.js
index 856daf5..10ce4ed 100755
--- a/app/modules/AppKit/lib/js/icinga/api/RESTFilterComboBox.js
+++ b/app/modules/AppKit/lib/js/icinga/api/RESTFilterComboBox.js
@@ -19,7 +19,7 @@ Icinga.Api.RESTFilterComboBox = Ext.extend(Ext.ux.AutoComboBox,{
         cfg.displayField = cfg.targetField; 
         cfg.valueField = cfg.targetField; 
         this.storeFieldName = cfg.targetField;
-        AppKit.log(cfg);
+        // AppKit.log(cfg);
         cfg.store = store; 
         Ext.ux.AutoComboBox.prototype.constructor.call(this,cfg);
 
diff --git a/doc/CHANGELOG-1.6 b/doc/CHANGELOG-1.6
index 2fe7024..daad4ad 100644
--- a/doc/CHANGELOG-1.6
+++ b/doc/CHANGELOG-1.6
@@ -22,6 +22,7 @@ Features
     * More logging, verbose query logging #2277
     * New "simple" searchbox #2353
     * Show downtime type (fixed, flexible) #2076
+    * Group inheritance, load group data from tree #2370
 
 Bugs
     * Fixed Auth.Dispatch import group assign #2284





More information about the icinga-checkins mailing list