Daniel Erez has posted comments on this change.

Change subject: Adding HostSubTab to UI for BIOS information
......................................................................


Patch Set 4: (11 inline comments)

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostBiosModel.java
Line 10: 
Line 11: @SuppressWarnings("unused")
Line 12: public class HostBiosModel extends EntityModel
Line 13: {
Line 14: 
No need for these events in this model (they are used in HostGeneralModel for 
the links in host general sub-tab).
Line 15:     public static EventDefinition RequestEditEventDefinition;
Line 16:     private Event privateRequestEditEvent;
Line 17: 
Line 18:     public Event getRequestEditEvent()


Line 36:     private void setRequestGOToEventsTabEvent(Event value)
Line 37:     {
Line 38:         privateRequestGOToEventsTabEvent = value;
Line 39:     }
Line 40: 
The following commands are redundant as well - they are usually used for 
sub-tab's buttons (which aren't available here).
Line 41:     private UICommand privateInstallCommand;
Line 42: 
Line 43:     public UICommand getInstallCommand()
Line 44:     {


Line 74:         privateGoToEventsCommand = value;
Line 75:     }
Line 76: 
Line 77:     private boolean updateUpgradeAlert;
Line 78: 
Same here
Line 79:     @Override
Line 80:     public VDS getEntity()
Line 81:     {
Line 82:         return (VDS) super.getEntity();


Line 193:     {
Line 194:         RequestEditEventDefinition = new 
EventDefinition("RequestEditEvent", HostGeneralModel.class); //$NON-NLS-1$
Line 195:         RequestGOToEventsTabEventDefinition = new 
EventDefinition("RequestGOToEventsTabEvent", HostGeneralModel.class); 
//$NON-NLS-1$
Line 196:     }
Line 197: 
The event definition should be removed.
Line 198:     public HostBiosModel()
Line 199:     {
Line 200:         setRequestEditEvent(new Event(RequestEditEventDefinition));
Line 201:         setRequestGOToEventsTabEvent(new 
Event(RequestGOToEventsTabEventDefinition));


Line 196:     }
Line 197: 
Line 198:     public HostBiosModel()
Line 199:     {
Line 200:         setRequestEditEvent(new Event(RequestEditEventDefinition));
Same here
Line 201:         setRequestGOToEventsTabEvent(new 
Event(RequestGOToEventsTabEventDefinition));
Line 202:         
setTitle(ConstantsManager.getInstance().getConstants().generalTitle());
Line 203:         setHashName("bios"); //$NON-NLS-1$
Line 204: 


Line 223:         setBiosSerialNumber(vds.getBiosSerialNumber());
Line 224:         setBiosFamily(vds.getBiosFamily());
Line 225:     }
Line 226: 
Line 227:     private void GoToEvents()
Redundant function
Line 228:     {
Line 229:         this.getRequestGOToEventsTabEvent().raise(this, null);
Line 230:     }
Line 231: 


Line 240:         }
Line 241:     }
Line 242: 
Line 243:     @Override
Line 244:     public void ExecuteCommand(UICommand command)
Redundant overide
Line 245:     {
Line 246:         super.ExecuteCommand(command);
Line 247:     }


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/uicommon/HostModule.java
Line 130:             }
Line 131:         };
Line 132:     }
Line 133: 
Line 134:     @Provides
The provider is used only for displaying a pop-up.
Should be removed since it's a read-only sub-tab
(without any links or actions)
Line 135:     @Singleton
Line 136:     public DetailModelProvider<HostListModel, HostBiosModel> 
getHostBiosProvider(ClientGinjector ginjector,
Line 137:             final Provider<HostInstallPopupPresenterWidget> 
installPopupProvider) {
Line 138:         return new DetailTabModelProvider<HostListModel, 
HostBiosModel>(ginjector,


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/presenter/tab/host/SubTabHostBiosPresenter.java
Line 35:     }
Line 36: 
Line 37:     // We need this to get the text of the alert messages:
Line 38:     private final ApplicationMessages messages;
Line 39: 
There is no use of alert messages on this tab (ApplicationMessages messages can 
be removed).
Line 40:     @TabInfo(container = HostSubTabPanelPresenter.class)
Line 41:     static TabData getTabData(ClientGinjector ginjector) {
Line 42:         return new 
ModelBoundTabData(ginjector.getApplicationConstants().hostBiosSubTabLabel(), 5,
Line 43:                 ginjector.getSubTabHostBiosModelProvider());


Line 38:     private final ApplicationMessages messages;
Line 39: 
Line 40:     @TabInfo(container = HostSubTabPanelPresenter.class)
Line 41:     static TabData getTabData(ClientGinjector ginjector) {
Line 42:         return new 
ModelBoundTabData(ginjector.getApplicationConstants().hostBiosSubTabLabel(), 5,
SubTabHostEventPresenter -> getTabData() priority should be pushed to 6
(it is currently 5).
Line 43:                 ginjector.getSubTabHostBiosModelProvider());
Line 44:     }
Line 45: 
Line 46:     @Inject


....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostBiosView.java
Line 67:         formBuilder = new FormBuilder(formPanel, 3, 6);
Line 68:         formBuilder.setColumnsWidth("230px", "120px", "270px"); 
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Line 69: 
Line 70:         ArrayList<FormItem> formItems = new ArrayList<FormItem>();
Line 71:         formItems.add(new 
FormItem(constants.biosManufacturerGeneral(), biosManufacturer, 0, 0));
No need for 'formItems' variable - simply call 'formBuilder.addFormItem' on 
each new FormItem.
Line 72:         formItems.add(new FormItem(constants.biosProductNameGeneral(), 
biosProductName, 1, 0));
Line 73:         formItems.add(new FormItem(constants.biosUUIDGeneral(), 
biosUUID, 2, 0));
Line 74:         formItems.add(new FormItem(constants.biosVersionGeneral(), 
biosVersion, 3, 0));
Line 75:         formItems.add(new 
FormItem(constants.biosSerialNumberGeneral(), biosSerialNumber, 4, 0));


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3de1be89f0457f9fc7b9f3db741df8bce05ed704
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Alexey Chub <ac...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to