Search in sources :

Example 1 with StringValueLabel

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;
}
Also used : StorageDomainType(org.ovirt.engine.core.common.businessentities.StorageDomainType) TreeItem(com.google.gwt.user.client.ui.TreeItem) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) Image(com.google.gwt.user.client.ui.Image) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage) StringValueLabel(org.ovirt.engine.ui.common.widget.label.StringValueLabel) StorageDomainSharedStatus(org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus)

Example 2 with StringValueLabel

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;
}
Also used : StringValueLabel(org.ovirt.engine.ui.common.widget.label.StringValueLabel)

Example 3 with StringValueLabel

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);
}
Also used : TreeItem(com.google.gwt.user.client.ui.TreeItem) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) StringValueLabel(org.ovirt.engine.ui.common.widget.label.StringValueLabel)

Example 4 with StringValueLabel

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);
        }
    }
}
Also used : FormBuilder(org.ovirt.engine.ui.common.widget.form.FormBuilder) FormItem(org.ovirt.engine.ui.common.widget.form.FormItem) StringValueLabel(org.ovirt.engine.ui.common.widget.label.StringValueLabel) GeneralFormPanel(org.ovirt.engine.ui.common.widget.form.GeneralFormPanel)

Example 5 with StringValueLabel

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;
}
Also used : TreeItem(com.google.gwt.user.client.ui.TreeItem) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) Image(com.google.gwt.user.client.ui.Image) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage) StringValueLabel(org.ovirt.engine.ui.common.widget.label.StringValueLabel) FullDateTimeLabel(org.ovirt.engine.ui.webadmin.widget.label.FullDateTimeLabel)

Aggregations

StringValueLabel (org.ovirt.engine.ui.common.widget.label.StringValueLabel)13 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)10 TreeItem (com.google.gwt.user.client.ui.TreeItem)10 Image (com.google.gwt.user.client.ui.Image)9 DiskImage (org.ovirt.engine.core.common.businessentities.storage.DiskImage)9 FullDateTimeLabel (org.ovirt.engine.ui.webadmin.widget.label.FullDateTimeLabel)6 ImageResource (com.google.gwt.resources.client.ImageResource)2 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)2 StorageDomainSharedStatus (org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus)2 StorageDomainType (org.ovirt.engine.core.common.businessentities.StorageDomainType)2 DiskInterface (org.ovirt.engine.core.common.businessentities.storage.DiskInterface)2 DiskStorageType (org.ovirt.engine.core.common.businessentities.storage.DiskStorageType)2 ImageStatus (org.ovirt.engine.core.common.businessentities.storage.ImageStatus)2 VolumeType (org.ovirt.engine.core.common.businessentities.storage.VolumeType)2 DateLabel (com.google.gwt.user.client.ui.DateLabel)1 IsWidget (com.google.gwt.user.client.ui.IsWidget)1 Label (com.google.gwt.user.client.ui.Label)1 ValueLabel (com.google.gwt.user.client.ui.ValueLabel)1 Widget (com.google.gwt.user.client.ui.Widget)1 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)1