anmolbabu has uploaded a new change for review. Change subject: webadmin : Fix Gluster only mode System tree ......................................................................
webadmin : Fix Gluster only mode System tree This patch fixes the issue of System tree containing only 2 entries System and Sessions. This was happening as the filterSystemTreeByApplictionMode of ApplicationModeHelper invoked by SystemTreeModel's executed used to filter out(remove) the nodes in accordance with ApplicationMode associated with nodes of SystemTree. In Gluster's case , there isn't DataCenter node and hence all its child nodes are also removed due to filterSystemTreeByApplictionMode. Hence, this patch utilizes the following approach, Filter out the nodes as usual as per the associated ApplicationMode. But, attach the child-nodes of the node to be removed, to the parent of the node to be removed if it is applicable to the current ApplicationMode. In our Gluster's case it makes sense as, the Hosts and Volumes make sense to the GlusterOnly mode but not its parent DataCenter. Change-Id: I7c85bc2b78f885511a8e53212984d93343ffd6a8 Signed-off-by: Anmol Babu <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ApplicationModeHelper.java 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/63/39363/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ApplicationModeHelper.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ApplicationModeHelper.java index 374d323..4860896 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ApplicationModeHelper.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ApplicationModeHelper.java @@ -75,6 +75,9 @@ for (SystemTreeItemModel systemTreeItemModel : list) { systemItem.getChildren().remove(systemTreeItemModel); + if(systemTreeItemModel.getChildren() != null && !systemItem.getChildren().containsAll(systemTreeItemModel.getChildren())) { + systemItem.getChildren().addAll(systemTreeItemModel.getChildren()); + } } return !((systemItem.getApplicationMode().getValue() & getUiMode().getValue()) > 0); } -- To view, visit https://gerrit.ovirt.org/39363 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c85bc2b78f885511a8e53212984d93343ffd6a8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
