use of org.ovirt.engine.ui.common.widget.label.StringValueLabel in project ovirt-engine by oVirt.
the class DisksTree method getNodeItem.
@Override
protected TreeItem getNodeItem(StorageDomain storage) {
HorizontalPanel panel = new HorizontalPanel();
panel.setSpacing(1);
// $NON-NLS-1$
panel.setWidth("100%");
// $NON-NLS-1$
addItemToPanel(panel, new Image(resources.storageImage()), "25px");
// $NON-NLS-1$
addTextBoxToPanel(panel, new StringValueLabel(), storage.getStorageName(), "");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<StorageDomainType>(), storage.getStorageDomainType(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new EnumLabel<StorageDomainSharedStatus>(), storage.getStorageDomainSharedStatus(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Integer>(), storage.getAvailableDiskSize(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Integer>(), storage.getUsedDiskSize(), "120px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Integer>(), storage.getTotalDiskSize(), "120px");
TreeItem treeItem = new TreeItem(panel);
treeItem.setUserObject(storage.getId());
return treeItem;
}
use of org.ovirt.engine.ui.common.widget.label.StringValueLabel in project ovirt-engine by oVirt.
the class FormItem method withDefaultValue.
/**
* Use {@code defaultValue} based on dynamic {@code defaultValueCondition}.
*/
public FormItem withDefaultValue(String defaultValue, DefaultValueCondition defaultValueCondition) {
this.defaultValueLabel = new StringValueLabel(defaultValue);
this.defaultValueCondition = defaultValueCondition;
return this;
}
use of org.ovirt.engine.ui.common.widget.label.StringValueLabel in project ovirt-engine by oVirt.
the class SanStorageTargetToLunList method createRootNode.
@Override
protected TreeItem createRootNode(SanTargetModel rootModel) {
HorizontalPanel panel = new HorizontalPanel();
// $NON-NLS-1$
additemToRootNodePanel(panel, new StringValueLabel(), rootModel.getName(), "", TextAlignment.LEFT);
// $NON-NLS-1$
additemToRootNodePanel(panel, new StringValueLabel(), rootModel.getAddress(), "95px", TextAlignment.LEFT);
// $NON-NLS-1$
additemToRootNodePanel(panel, new StringValueLabel(), rootModel.getPort(), "60px", TextAlignment.LEFT);
addLoginButton(panel, rootModel);
panel.setSpacing(1);
// $NON-NLS-1$
panel.setWidth("100%");
panel.getElement().getStyle().setTableLayout(TableLayout.FIXED);
return new TreeItem(panel);
}
use of org.ovirt.engine.ui.common.widget.label.StringValueLabel 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.label.StringValueLabel in project ovirt-engine by oVirt.
the class TemplatesTree method getRootItem.
@Override
protected TreeItem getRootItem(VmTemplate template) {
HorizontalPanel panel = new HorizontalPanel();
panel.setSpacing(1);
// $NON-NLS-1$
panel.setWidth("100%");
// $NON-NLS-1$
addItemToPanel(panel, new Image(resources.vmImage()), "25px");
// $NON-NLS-1$
addTextBoxToPanel(panel, new StringValueLabel(), template.getName(), "");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Integer>(), template.getDiskTemplateMap().size(), "110px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new DiskSizeLabel<Double>(), template.getActualDiskSize(), "110px");
// $NON-NLS-1$
addValueLabelToPanel(panel, new FullDateTimeLabel(), template.getCreationDate(), "140px");
TreeItem treeItem = new TreeItem(panel);
treeItem.setUserObject(template.getId());
return treeItem;
}
Aggregations