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

git at icinga.org git at icinga.org
Tue Dec 13 14:23:37 CET 2011


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

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 ++-
 .../lib/js/admin/components/RoleListingGrid.js     |    4 +++-
 2 files changed, 5 insertions(+), 2 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/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