Search in sources :

Example 1 with StorageDomainSharedStatus

use of org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus 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 StorageDomainSharedStatus

use of org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus in project ovirt-engine by oVirt.

the class StorageDomainCommandBase method addStorageDomainStatusIllegalMessage.

protected void addStorageDomainStatusIllegalMessage() {
    addValidationMessage(EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2);
    StorageDomainStatus status = getStorageDomainStatus();
    StorageDomainSharedStatus sharedStatus = getStorageDomainSharedStatus();
    Object messageParameter = status;
    if (status == StorageDomainStatus.Unknown && sharedStatus != null) {
        // We got more informative information than "Unknown".
        messageParameter = sharedStatus;
    }
    addValidationMessageVariable("status", messageParameter);
}
Also used : StorageDomainStatus(org.ovirt.engine.core.common.businessentities.StorageDomainStatus) StorageDomainSharedStatus(org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus)

Example 3 with StorageDomainSharedStatus

use of org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus in project ovirt-engine by oVirt.

the class StoragesTree method getRootItem.

@Override
protected TreeItem getRootItem(StorageDomainModel storageDomainModel) {
    HorizontalPanel panel = new HorizontalPanel();
    panel.setSpacing(1);
    // $NON-NLS-1$
    panel.setWidth("100%");
    StorageDomain storage = storageDomainModel.getStorageDomain();
    // $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(), "90px");
    TreeItem treeItem = new TreeItem(panel);
    treeItem.setUserObject(storage.getId());
    return treeItem;
}
Also used : StorageDomainType(org.ovirt.engine.core.common.businessentities.StorageDomainType) StorageDomain(org.ovirt.engine.core.common.businessentities.StorageDomain) 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)

Aggregations

StorageDomainSharedStatus (org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus)3 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)2 Image (com.google.gwt.user.client.ui.Image)2 TreeItem (com.google.gwt.user.client.ui.TreeItem)2 StorageDomainType (org.ovirt.engine.core.common.businessentities.StorageDomainType)2 DiskImage (org.ovirt.engine.core.common.businessentities.storage.DiskImage)2 StringValueLabel (org.ovirt.engine.ui.common.widget.label.StringValueLabel)2 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)1 StorageDomainStatus (org.ovirt.engine.core.common.businessentities.StorageDomainStatus)1