Alona Kaplan has posted comments on this change.

Change subject: webadmin: Hiding virt network fields in gluster mode
......................................................................


Patch Set 4:

(3 comments)

NetworkModel.setSupportBridgesReportByVDSM- in case the bridges report is not 
supported by vdsm, the network is automatically marked as vm network. IIUC, 
this behavior should be changed to take place only 
if(!isSupportBridgesReportByVDSM && virtOnlyMode)

https://gerrit.ovirt.org/#/c/41480/4/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/AbstractNetworkPopupView.java:

Line 432:     @Override
Line 433:     public void updateVisibility() {
Line 434:         messageLabel.setVisible(false);
Line 435:         if 
(!ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly)) {
Line 436:             externalProviderEditor.setVisible(false);
The reason the visibility of messageLabel is controlled form here is because 
the messageLabel is not part of the NetworkModel.
All the other fields have a representation in NetworkModel so please control 
their visibility via the model (the model method for controlling the visibility 
is- setIsAvailiable(..)).
Line 437:             neutronPhysicalNetwork.setVisible(false);
Line 438:             createSubnetEditor.setVisible(false);
Line 439:             vlanTagging.setVisible(false);
Line 440:             vlanTag.setVisible(false);


https://gerrit.ovirt.org/#/c/41480/4/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabNetworkView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/MainTabNetworkView.java:

Line 73:         getTable().addColumnWithHtmlHeader(commentColumn,
Line 74:                 
SafeHtmlUtils.fromSafeConstant(constants.commentLabel()),
Line 75:                 "75px"); //$NON-NLS-1$
Line 76: 
Line 77:         if 
(ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly)) {
Consider storing 
ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly) in a varialbe.
Line 78:             AbstractTextColumn<NetworkView> dcColumn = new 
AbstractTextColumn<NetworkView>() {
Line 79:                 @Override
Line 80:                 public String getValue(NetworkView object) {
Line 81:                     return object.getDataCenterName();


Line 82:                 }
Line 83:             };
Line 84:             
dcColumn.makeSortable(NetworkConditionFieldAutoCompleter.DATA_CENTER);
Line 85: 
Line 86:             getTable().addColumn(dcColumn, constants.dcNetwork(), 
"200px"); //$NON-NLS-1$
Please use- getTable().ensureColumnPresent(..) instead of the 'if' block around 
the column creation.
It receives a parameter to identify whether the column should be visible.
You can see how the columns are added to SubTabNetworkVmView for example.
Line 87:         }
Line 88: 
Line 89:         AbstractTextColumn<NetworkView> descriptionColumn = new 
AbstractTextColumn<NetworkView>() {
Line 90:             @Override


-- 
To view, visit https://gerrit.ovirt.org/41480
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If9380697adc0c6e1d698e7aacc1f9b47be0d3851
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: anmolbabu <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to