Martin Sivák has posted comments on this change.

Change subject: Expose the info about HBA devices in frontend
......................................................................


Patch Set 5: (3 inline comments)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostHardwareGeneralModel.java
Line 162:         List<EnumMap<HbaDeviceKeys, String>> hbaDevices = new 
ArrayList<EnumMap<HbaDeviceKeys, String>>();
Line 163:         List<Map<String, String>> fcDevices = 
vds.getHBAs().get("FC"); //$NON-NLS-1$
Line 164: 
Line 165:         if (fcDevices != null) {
Line 166:             for (Map<String, String> device: fcDevices) {
Maybe, but the data structure is constructed from xml-rpc data and serialized 
as json in the database.. So the type translation will still have to happen at 
one place or another.

Also it really is a (usually) two element HashMap where each element is a 
list/array (depending whether you use our json or xml-rpc.. they do not use 
common structure..) of devices with arbitrary number of attributes.
Line 167:                 EnumMap<HbaDeviceKeys, String> deviceModel = new 
EnumMap<HbaDeviceKeys, String>(HbaDeviceKeys.class);
Line 168:                 deviceModel.put(HbaDeviceKeys.MODEL_NAME, 
device.get("model")); //$NON-NLS-1$
Line 169:                 deviceModel.put(HbaDeviceKeys.WWNN, 
device.get("wwnn")); //$NON-NLS-1$
Line 170:                 deviceModel.put(HbaDeviceKeys.WWNPS, 
device.get("wwpn")); //$NON-NLS-1$


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostHardwareView.java
Line 81: 
Line 82:     @Override
Line 83:     public void setMainTabSelectedItem(VDS selectedItem) {
Line 84:         driver.edit(getDetailModel());
Line 85: 
It was an UX decision to show the info on the subtab.
Line 86:         /* refresh all the information about HBA (FC, iSCSI) devices */
Line 87:         habInventory.clear();
Line 88: 
Line 89:         if (selectedItem != null && getDetailModel().getHbaDevices() 
!= null) {


Line 90: 
Line 91:             /*
Line 92:              * traverse the model and get all the HBAs
Line 93:              */
Line 94:             for (EnumMap<HostHardwareGeneralModel.HbaDeviceKeys, 
String> hbaDevice : getDetailModel().getHbaDevices()) {
Done
Line 95:                 GeneralFormPanel hbaFormPanel = new GeneralFormPanel() 
{
Line 96:                     {
Line 97:                         getElement().getStyle().setFloat(Float.LEFT);
Line 98:                         getElement().getStyle().setBorderWidth(1, 
Unit.PX);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I44efcf1feabb3491aa46bd9294b14424483872c1
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to