anmolbabu has uploaded a new change for review. Change subject: webadmin : Fixed allignment issues in Hosts General sub-tab ......................................................................
webadmin : Fixed allignment issues in Hosts General sub-tab The rows in Hosts General sub-tab were not alligned properly as each of them were of a different type of label.Some of them ex : 1. TextBoxLabel were generating a input-class for the values. 2. Other labels(inheriting ValueLabel) were generating a span tag. So,this patch makes it uniform by replacing all TextBoxLabel by ValueLabel and hence fixes all the row allignment issues in Host->General. Change-Id: Iba34398f6972f90d81d76196e060c9184665dd22 Signed-off-by: Anmol Babu <[email protected]> --- M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java 1 file changed, 21 insertions(+), 36 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/64/20964/1 diff --git a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java index 87fad97..3cd45e7 100644 --- a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java +++ b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java @@ -130,47 +130,32 @@ driver.initialize(this); boolean virtSupported = ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly); - boolean glusterSupported = ApplicationModeHelper.isModeSupported(ApplicationMode.GlusterOnly); - boolean bothGlusterAndVirt = ApplicationModeHelper.isModeSupported(ApplicationMode.AllModes); + // Build a form using the FormBuilder formBuilder = new FormBuilder(formPanel, 3, 7); - int rowCount = -1; + formBuilder.addFormItem(new FormItem(constants.osVersionHostGeneral(), oS, 0, 0)); + formBuilder.addFormItem(new FormItem(constants.kernelVersionHostGeneral(), kernelVersion, 1, 0)); + formBuilder.addFormItem(new FormItem(constants.kvmVersionHostGeneral(), kvmVersion, 2, 0, virtSupported)); + formBuilder.addFormItem(new FormItem(constants.libvirtVersionHostGeneral(), libvirtVersion, 3, 0, virtSupported)); + formBuilder.addFormItem(new FormItem(constants.vdsmVersionHostGeneral(), vdsmVersion, 4, 0)); + formBuilder.addFormItem(new FormItem(constants.spiceVersionHostGeneral(), spiceVersion, 5, 0, virtSupported)); + formBuilder.addFormItem(new FormItem(constants.isciInitNameHostGeneral(), iScsiInitiatorName, 6, 0, virtSupported)); - formBuilder.addFormItem(new FormItem(constants.osVersionHostGeneral(), oS, ++rowCount, 0)); - formBuilder.addFormItem(new FormItem(constants.kernelVersionHostGeneral(), kernelVersion, ++rowCount, 0)); - if ((!glusterSupported) || bothGlusterAndVirt) { - formBuilder.addFormItem(new FormItem(constants.kvmVersionHostGeneral(), kvmVersion, ++rowCount, 0, virtSupported)); - formBuilder.addFormItem(new FormItem(constants.libvirtVersionHostGeneral(), libvirtVersion, ++rowCount, 0, virtSupported)); - } - formBuilder.addFormItem(new FormItem(constants.vdsmVersionHostGeneral(), vdsmVersion, ++rowCount, 0)); - if ((!glusterSupported) || bothGlusterAndVirt) { - formBuilder.addFormItem(new FormItem(constants.spiceVersionHostGeneral(), spiceVersion, ++rowCount, 0, virtSupported)); - formBuilder.addFormItem(new FormItem(constants.isciInitNameHostGeneral(), iScsiInitiatorName, ++rowCount, 0, virtSupported)); - } + formBuilder.addFormItem(new FormItem(constants.spmPriority(), spmPriority, 0, 1, virtSupported)); + formBuilder.addFormItem(new FormItem(constants.activeVmsHostGeneral(), activeVms, 1, 1, virtSupported)); + formBuilder.addFormItem(new FormItem(constants.cpuNameHostGeneral(), cpuName, 2, 1)); + formBuilder.addFormItem(new FormItem(constants.cpuTypeHostGeneral(), cpuType, 3, 1)); + formBuilder.addFormItem(new FormItem(constants.numOfSocketsHostGeneral(), numberOfSockets, 4, 1)); + formBuilder.addFormItem(new FormItem(constants.numOfCoresPerSocketHostGeneral(), coresPerSocket, 5, 1)); + formBuilder.addFormItem(new FormItem(constants.numOfThreadsPerCoreHostGeneral(), threadsPerCore, 6, 1)); - rowCount = -1; - - if ((!glusterSupported) || bothGlusterAndVirt) { - formBuilder.addFormItem(new FormItem(constants.spmPriority(), spmPriority, ++rowCount, 1, virtSupported)); - formBuilder.addFormItem(new FormItem(constants.activeVmsHostGeneral(), activeVms, ++rowCount, 1, virtSupported)); - } - formBuilder.addFormItem(new FormItem(constants.cpuNameHostGeneral(), cpuName, ++rowCount, 1)); - formBuilder.addFormItem(new FormItem(constants.cpuTypeHostGeneral(), cpuType, ++rowCount, 1)); - formBuilder.addFormItem(new FormItem(constants.numOfSocketsHostGeneral(), numberOfSockets, ++rowCount, 1)); - formBuilder.addFormItem(new FormItem(constants.numOfCoresPerSocketHostGeneral(), coresPerSocket, ++rowCount, 1)); - formBuilder.addFormItem(new FormItem(constants.numOfThreadsPerCoreHostGeneral(), threadsPerCore, ++rowCount, 1)); - - rowCount = -1; - - formBuilder.addFormItem(new FormItem(constants.physMemHostGeneral(), physicalMemoryDetails, ++rowCount, 2)); - formBuilder.addFormItem(new FormItem(constants.swapSizeHostGeneral(), swapSizeDetails, ++rowCount, 2)); - formBuilder.addFormItem(new FormItem(constants.sharedMemHostGeneral(), sharedMemory, ++rowCount, 2)); - if ((!glusterSupported) || bothGlusterAndVirt) { - formBuilder.addFormItem(new FormItem(constants.maxSchedulingMemory(), maxSchedulingMemory, ++rowCount, 2, virtSupported)); - } - formBuilder.addFormItem(new FormItem(constants.memPageSharingHostGeneral(), memoryPageSharing, ++rowCount, 2)); - formBuilder.addFormItem(new FormItem(constants.autoLargePagesHostGeneral(), automaticLargePage, ++rowCount, 2)); + formBuilder.addFormItem(new FormItem(constants.physMemHostGeneral(), physicalMemoryDetails, 0, 2)); + formBuilder.addFormItem(new FormItem(constants.swapSizeHostGeneral(), swapSizeDetails, 1, 2)); + formBuilder.addFormItem(new FormItem(constants.sharedMemHostGeneral(), sharedMemory, 2, 2)); + formBuilder.addFormItem(new FormItem(constants.maxSchedulingMemory(), maxSchedulingMemory, 3, 2, virtSupported)); + formBuilder.addFormItem(new FormItem(constants.memPageSharingHostGeneral(), memoryPageSharing, 4, 2)); + formBuilder.addFormItem(new FormItem(constants.autoLargePagesHostGeneral(), automaticLargePage, 5, 2)); } void initMemorySizeLabels() { -- To view, visit http://gerrit.ovirt.org/20964 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba34398f6972f90d81d76196e060c9184665dd22 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
