anmolbabu has posted comments on this change.

Change subject: webadmin: Fix System tree when in Gluster-only mode
......................................................................


Patch Set 7:

(1 comment)

https://gerrit.ovirt.org/#/c/39363/7/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ApplicationModeHelper.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ApplicationModeHelper.java:

Line 74:         }
Line 75: 
Line 76:         for (SystemTreeItemModel systemTreeItemModel : list) {
Line 77:             systemItem.getChildren().remove(systemTreeItemModel);
Line 78:             if(systemTreeItemModel.getChildren() != null && 
!systemItem.getChildren().containsAll(systemTreeItemModel.getChildren())) {
> How are we making sure this happens in Gluster-only mode?
Well there is no check specific for Gluster-only mode.
It checks like this,
[1] For every current node, it gathers the list of its children not eligible 
for current       
    ApplicationMode.

[2] And then for every item in the list,
    I am not quite sure why the 
    if(systemTreeItemModel.getChildren() != null &&  
!systemItem.getChildren().containsAll(systemTreeItemModel.getChildren()))
   check would be required now. It was of no impact in the Gluster-only mode 
and hence,    
   the check [3] below was required.

[3] My check :
    if the current node doesn't make sense to the current ApplicationMode 
gather its children and attach it to the parent of node of current iteration 
instead of removing it off and let them undergo one more check for 
ApplicationMode.

So, for me the [2] above was not working because it applies only if all the 
collected children are to removed. But in Gluster-only case, only the child 
DataCenter of the node System should not appear in the system-tree. And hence, 
check [3] was required for me.
Line 79:                 
systemItem.getChildren().addAll(systemTreeItemModel.getChildren());
Line 80:             }
Line 81:         }
Line 82:         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: comment
Gerrit-Change-Id: I7c85bc2b78f885511a8e53212984d93343ffd6a8
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to