use of org.ovirt.engine.ui.common.widget.form.FormBuilder in project ovirt-engine by oVirt.
the class HostGeneralSubTabView method refreshHBADeviceInfo.
private void refreshHBADeviceInfo(VDS selectedItem) {
/* refresh all the information about Host Bus Adapter (FC, iSCSI) devices */
hbaInventory.clear();
if (selectedItem != null && hardWareModelProvider.getModel().getHbaDevices() != null) {
/*
* traverse the model and get all the HBAs
*/
for (EnumMap<HostHardwareGeneralModel.HbaDeviceKeys, String> hbaDevice : hardWareModelProvider.getModel().getHbaDevices()) {
GeneralFormPanel hbaFormPanel = new GeneralFormPanel() {
{
getElement().getStyle().setFloat(Float.LEFT);
getElement().getStyle().setBorderWidth(1, Unit.PX);
getElement().getStyle().setBorderStyle(BorderStyle.SOLID);
// $NON-NLS-1$
getElement().getStyle().setBorderColor("black");
getElement().getStyle().setMarginLeft(5, Unit.PX);
getElement().getStyle().setMarginBottom(5, Unit.PX);
// $NON-NLS-1$ //$NON-NLS-2$
getElement().getStyle().setProperty("width", "auto");
}
};
StringValueLabel interfaceName = new StringValueLabel(hbaDevice.get(HostHardwareGeneralModel.HbaDeviceKeys.MODEL_NAME));
StringValueLabel interfaceType = new StringValueLabel(hbaDevice.get(HostHardwareGeneralModel.HbaDeviceKeys.TYPE));
StringValueLabel interfaceWWNN = new StringValueLabel(hbaDevice.get(HostHardwareGeneralModel.HbaDeviceKeys.WWNN));
StringValueLabel portWWPNs = new StringValueLabel(hbaDevice.get(HostHardwareGeneralModel.HbaDeviceKeys.WWNPS));
FormBuilder hbaFormBuilder = new FormBuilder(hbaFormPanel, 1, 4);
hbaFormBuilder.setRelativeColumnWidth(0, 12);
hbaFormBuilder.addFormItem(new FormItem(constants.hbaModelName(), interfaceName, 0, 0));
hbaFormBuilder.addFormItem(new FormItem(constants.hbaDeviceType(), interfaceType, 1, 0));
hbaFormBuilder.addFormItem(new FormItem(constants.hbaWWNN(), interfaceWWNN, 2, 0));
hbaFormBuilder.addFormItem(new FormItem(constants.hbaWWPNs(), portWWPNs, 3, 0));
hbaInventory.add(hbaFormPanel);
}
}
}
use of org.ovirt.engine.ui.common.widget.form.FormBuilder in project ovirt-engine by oVirt.
the class HostGeneralSubTabView method populateGeneralFormPanel.
private void populateGeneralFormPanel(boolean virtSupported) {
// Build a form using the FormBuilder
generalFormBuilder = new FormBuilder(generalFormPanel, 3, 6);
generalFormBuilder.setRelativeColumnWidth(0, 3);
generalFormBuilder.setRelativeColumnWidth(1, 4);
generalFormBuilder.setRelativeColumnWidth(2, 5);
generalFormBuilder.addFormItem(new FormItem(constants.spmPriority(), spmPriority, 0, 0, virtSupported).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.activeVmsHostGeneral(), activeVms, 0, virtSupported).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.logicalCores(), logicalCores, 0).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.onlineCores(), onlineCores, 0).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.bootTimeHostGeneral(), bootTime, 0).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.hostedEngineHaHostGeneral(), hostedEngineHa, 0, virtSupported).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.isciInitNameHostGeneral(), iScsiInitiatorName, 0, 1, virtSupported).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.kdumpStatus(), kdumpStatus, 1).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.physMemHostGeneral(), physicalMemoryDetails, 1).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.swapSizeHostGeneral(), swapSizeDetails, 1).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.sharedMemHostGeneral(), sharedMemory, 1).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.hostDevicePassthroughHostGeneral(), hostDevicePassthroughSupport, 1).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.maxSchedulingMemory(), maxSchedulingMemory, 0, 2, virtSupported).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.memPageSharingHostGeneral(), memoryPageSharing, 2).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.autoLargePagesHostGeneral(), automaticLargePage, 2).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.hostHugePages(), hugePages, 2).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.selinuxModeGeneral(), selinuxEnforceMode, 2).withAutoPlacement());
generalFormBuilder.addFormItem(new FormItem(constants.clusterCompatibilityVersion(), clusterCompatibilityVersion, 2).withAutoPlacement());
}
use of org.ovirt.engine.ui.common.widget.form.FormBuilder in project ovirt-engine by oVirt.
the class HostGeneralSubTabView method generateSoftwareFormPanel.
private void generateSoftwareFormPanel() {
boolean virtSupported = ApplicationModeHelper.isModeSupported(ApplicationMode.VirtOnly);
boolean glusterSupported = ApplicationModeHelper.isModeSupported(ApplicationMode.GlusterOnly);
// Build a form using the FormBuilder
softwareFormBuilder = new FormBuilder(softwareFormPanel, 1, 10);
softwareFormBuilder.setRelativeColumnWidth(0, 12);
softwareFormBuilder.addFormItem(new FormItem(constants.osVersionHostGeneral(), oS, 0).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.osPrettyName(), osPrettyName, 0).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.kernelVersionHostGeneral(), kernelVersion, 0).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.kvmVersionHostGeneral(), kvmVersion, 0, virtSupported).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.libvirtVersionHostGeneral(), libvirtVersion, 0, virtSupported).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.vdsmVersionHostGeneral(), vdsmVersion, 0).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.spiceVersionHostGeneral(), spiceVersion, 0, virtSupported).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.glusterVersionHostGeneral(), glusterVersion, 0, glusterSupported).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.cephVersionHostGeneral(), librbdVersion, 0, virtSupported).withAutoPlacement(), 2, 10);
softwareFormBuilder.addFormItem(new FormItem(constants.kernelFeatures(), kernelFeatures, 0, true).withAutoPlacement(), 2, 10);
}
use of org.ovirt.engine.ui.common.widget.form.FormBuilder in project ovirt-engine by oVirt.
the class HostGeneralSubTabView method generateHardwareFormPanel.
private void generateHardwareFormPanel() {
// Build a form using the FormBuilder
hardwareFormBuilder = new FormBuilder(hardwareFormPanel, 3, 4);
hardwareFormBuilder.setRelativeColumnWidth(0, 4);
hardwareFormBuilder.setRelativeColumnWidth(1, 5);
hardwareFormBuilder.setRelativeColumnWidth(2, 3);
hardwareFormBuilder.addFormItem(new FormItem(constants.hardwareManufacturerGeneral(), hardwareManufacturer, 0, 0), 5, 7);
hardwareFormBuilder.addFormItem(new FormItem(constants.hardwareVersionGeneral(), hardwareVersion, 1, 0), 5, 7);
hardwareFormBuilder.addFormItem(new FormItem(constants.cpuModelHostGeneral(), cpuModel, 2, 0), 5, 7);
hardwareFormBuilder.addFormItem(new FormItem(constants.numOfCoresPerSocketHostGeneral(), coresPerSocket, 3, 0), 5, 7);
hardwareFormBuilder.addFormItem(new FormItem(constants.hardwareFamilyGeneral(), hardwareFamily, 0, 1), 4, 8);
hardwareFormBuilder.addFormItem(new FormItem(constants.hardwareUUIDGeneral(), hardwareUUID, 1, 1), 4, 8);
hardwareFormBuilder.addFormItem(new FormItem(constants.cpuTypeHostGeneral(), cpuType, 2, 1), 4, 8);
hardwareFormBuilder.addFormItem(new FormItem(constants.numOfThreadsPerCoreHostGeneral(), threadsPerCore, 3, 1), 4, 8);
hardwareFormBuilder.addFormItem(new FormItem(constants.hardwareProductNameGeneral(), hardwareProductName, 0, 2), 4, 8);
hardwareFormBuilder.addFormItem(new FormItem(constants.hardwareSerialNumberGeneral(), hardwareSerialNumber, 1, 2), 4, 8);
hardwareFormBuilder.addFormItem(new FormItem(constants.numOfSocketsHostGeneral(), numberOfSockets, 2, 2), 4, 8);
}
Aggregations