Greg Sheremeta has uploaded a new change for review.

Change subject: webadmin: NPE fix in CommonModel
......................................................................

webadmin: NPE fix in CommonModel

Fixed an NPE that prevented the VMs from loading when
Gluster was configured in engine and the VMs item
was selected in the left-pane tree.

Change-Id: I7768bf29a3068a05af624dce1e95f9f2f14f792a
Bug-Url: https://bugzilla.redhat.com/987907
Signed-off-by: Greg Sheremeta <gsher...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/CommonModel.java
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/18615/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/CommonModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/CommonModel.java
index 8e9f5e0..de83d81 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/CommonModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/CommonModel.java
@@ -1237,7 +1237,11 @@
             case VMs: {
                 if (vmList.isSearchStringMatch(source))
                 {
-                    prefix.argvalue = "Vms: cluster = " + 
SystemTreeItemModel.findAncestor(SystemTreeItemType.Cluster, model).getTitle(); 
//$NON-NLS-1$
+                    SystemTreeItemModel ancestor = 
SystemTreeItemModel.findAncestor(SystemTreeItemType.Cluster, model);
+                    if (ancestor == null) {
+                        ancestor = 
SystemTreeItemModel.findAncestor(SystemTreeItemType.Cluster_Gluster, model);
+                    }
+                    prefix.argvalue = "Vms: cluster = " + ancestor.getTitle(); 
//$NON-NLS-1$
                 }
             }
                 break;


-- 
To view, visit http://gerrit.ovirt.org/18615
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7768bf29a3068a05af624dce1e95f9f2f14f792a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Greg Sheremeta <gsher...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to