[icinga-checkins] icinga.org: icinga-web/r1.6: * Further fixes for GroupManager (ref #2191)

git at icinga.org git at icinga.org
Fri Dec 16 14:53:18 CET 2011


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

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Dec 13 14:23:19 2011 +0100

* Further fixes for GroupManager (ref #2191)

---

 .../DataProvider/GroupProviderAction.class.php     |    3 ++-
 app/modules/AppKit/lib/js/admin/RoleManager.js     |    4 ++--
 .../lib/js/admin/components/RoleListingGrid.js     |    4 +++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/app/modules/AppKit/actions/DataProvider/GroupProviderAction.class.php b/app/modules/AppKit/actions/DataProvider/GroupProviderAction.class.php
index a9384b4..563b892 100644
--- a/app/modules/AppKit/actions/DataProvider/GroupProviderAction.class.php
+++ b/app/modules/AppKit/actions/DataProvider/GroupProviderAction.class.php
@@ -58,12 +58,13 @@ class AppKit_DataProvider_GroupProviderAction extends AppKitBaseAction {
         $principals = $r->getPrincipals();
         $roleObject["principals"] = array();
         foreach($principals as $principal)
-            $targets = $principal->NsmPrincipalTarget;
+            if (($targets = $principal->NsmPrincipalTarget)) {
             foreach($targets as $t)
                 $roleObject["principals"][] = array(
                     "target" => $t->NsmTarget->toArray(),
                     "values" => $t->NsmTargetValue->toArray()
                 );
+            }
         return $roleObject;    
     }
     
diff --git a/app/modules/AppKit/lib/js/admin/RoleManager.js b/app/modules/AppKit/lib/js/admin/RoleManager.js
index 777a7b9..b701c98 100644
--- a/app/modules/AppKit/lib/js/admin/RoleManager.js
+++ b/app/modules/AppKit/lib/js/admin/RoleManager.js
@@ -66,7 +66,7 @@ AppKit.Admin.RoleManager = Ext.extend(Ext.Container, {
                 autoScroll:true,
                 listeners: {
                     render: function() {
-                        this.roleList.load({params: {start:0,limit:25}});
+                        this.roleList.load();
                     },
                     scope:this
                 }
@@ -106,7 +106,7 @@ AppKit.Admin.RoleManager = Ext.extend(Ext.Container, {
                                 b.setIconClass('icinga-icon-disk');
                                 b.setText(_("Save"));
                                 b.setDisabled(false);
-                                _this.roleList.load({params: {start:0,limit:25}});
+                                _this.roleList.load();
                                 Ext.getCmp('roleEditor').setDisabled(true);
                             },
                             function() {
diff --git a/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js b/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
index e23418c..87601af 100644
--- a/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
+++ b/app/modules/AppKit/lib/js/admin/components/RoleListingGrid.js
@@ -61,7 +61,9 @@ AppKit.Admin.Components.RoleListingGrid = Ext.extend(Ext.grid.GridPanel,{
             scope:this,
             text: 'Refresh',
             handler: function(c) {
-                c.ownerCt.ownerCt.getBottomToolbar().doRefresh();
+            	if (!Ext.isEmpty(c.ownerCt.ownerCt.store) && "reload" in c.ownerCt.ownerCt.store) {
+                    c.ownerCt.ownerCt.store.reload();
+            	}
             }
 
         },{





More information about the icinga-checkins mailing list