Search in sources :

Example 1 with IStorageModel

use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.

the class AsyncDataProvider method getBlockDataStorageModels.

public List<IStorageModel> getBlockDataStorageModels() {
    ArrayList<IStorageModel> models = new ArrayList<>();
    IscsiStorageModel iscsiDataModel = new IscsiStorageModel();
    iscsiDataModel.setIsGroupedByTarget(true);
    models.add(iscsiDataModel);
    FcpStorageModel fcpDataModel = new FcpStorageModel();
    models.add(fcpDataModel);
    addTypeToStorageModels(StorageDomainType.Data, models);
    return models;
}
Also used : IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) ImportFcpStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.ImportFcpStorageModel) FcpStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.FcpStorageModel) ImportIscsiStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.ImportIscsiStorageModel) IscsiStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IscsiStorageModel) ArrayList(java.util.ArrayList)

Example 2 with IStorageModel

use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.

the class AsyncDataProvider method getIsoStorageModels.

public List<IStorageModel> getIsoStorageModels() {
    ArrayList<IStorageModel> models = new ArrayList<>();
    NfsStorageModel nfsIsoModel = new NfsStorageModel();
    models.add(nfsIsoModel);
    PosixStorageModel posixIsoModel = new PosixStorageModel();
    models.add(posixIsoModel);
    GlusterStorageModel glusterStorageModel = new GlusterStorageModel();
    models.add(glusterStorageModel);
    LocalStorageModel localIsoModel = new LocalStorageModel();
    models.add(localIsoModel);
    addTypeToStorageModels(StorageDomainType.ISO, models);
    return models;
}
Also used : PosixStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel) IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) NfsStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel) ArrayList(java.util.ArrayList) GlusterStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel) LocalStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel)

Example 3 with IStorageModel

use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.

the class AsyncDataProvider method getExportStorageModels.

public List<IStorageModel> getExportStorageModels() {
    ArrayList<IStorageModel> models = new ArrayList<>();
    NfsStorageModel nfsExportModel = new NfsStorageModel();
    models.add(nfsExportModel);
    PosixStorageModel posixExportModel = new PosixStorageModel();
    models.add(posixExportModel);
    GlusterStorageModel glusterExportModel = new GlusterStorageModel();
    models.add(glusterExportModel);
    LocalStorageModel localExportStorageModel = new LocalStorageModel();
    models.add(localExportStorageModel);
    addTypeToStorageModels(StorageDomainType.ImportExport, models);
    return models;
}
Also used : PosixStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel) IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) NfsStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel) ArrayList(java.util.ArrayList) GlusterStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel) LocalStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel)

Example 4 with IStorageModel

use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.

the class AsyncDataProvider method getImportBlockDataStorageModels.

public List<IStorageModel> getImportBlockDataStorageModels() {
    ArrayList<IStorageModel> models = new ArrayList<>();
    ImportIscsiStorageModel iscsiDataModel = new ImportIscsiStorageModel();
    models.add(iscsiDataModel);
    ImportFcpStorageModel fcpDataModel = new ImportFcpStorageModel();
    models.add(fcpDataModel);
    addTypeToStorageModels(StorageDomainType.Data, models);
    return models;
}
Also used : IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) ImportFcpStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.ImportFcpStorageModel) ArrayList(java.util.ArrayList) ImportIscsiStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.ImportIscsiStorageModel)

Example 5 with IStorageModel

use of org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel in project ovirt-engine by oVirt.

the class StoragePopupView method revealStorageView.

@SuppressWarnings("unchecked")
private void revealStorageView(StorageModel object) {
    StorageType storageType = storageTypeListEditor.asEditor().getActualEditor().getValue();
    StorageDomainType storageDomainType = domainFunctionListEditor.asEditor().getActualEditor().getValue();
    if (storageType == null || storageDomainType == null) {
        return;
    }
    switch(storageType) {
        case NFS:
            storageView = new NfsStorageView();
            break;
        case LOCALFS:
            storageView = new LocalStorageView();
            break;
        case POSIXFS:
            storageView = new PosixStorageView();
            break;
        case GLUSTERFS:
            storageView = new GlusterStorageView();
            break;
        case FCP:
            if (!object.getBehavior().isImport()) {
                storageView = new FcpStorageView(true);
            } else {
                storageView = new ImportFcpStorageView();
            }
            break;
        case ISCSI:
            if (!object.getBehavior().isImport()) {
                storageView = new IscsiStorageView(true);
            } else {
                storageView = new ImportIscsiStorageView();
            }
            break;
        default:
            break;
    }
    updateStorageItem(object);
    IStorageModel model = object.getCurrentStorageItem();
    // Re-apply element IDs on 'storageView' change
    ViewIdHandler.idHandler.generateAndSetIds(this);
    // Clear the current storage view
    specificStorageTypePanel.clear();
    // Add the new storage view and call focus on it if needed
    if (storageView != null && model != null) {
        storageView.edit(model);
        specificStorageTypePanel.add(storageView);
        if (!nameEditor.isVisible()) {
            storageView.focus();
        }
    }
}
Also used : StorageDomainType(org.ovirt.engine.core.common.businessentities.StorageDomainType) IStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel) FcpStorageView(org.ovirt.engine.ui.common.widget.uicommon.storage.FcpStorageView) ImportFcpStorageView(org.ovirt.engine.ui.common.widget.uicommon.storage.ImportFcpStorageView) StorageType(org.ovirt.engine.core.common.businessentities.storage.StorageType) ImportIscsiStorageView(org.ovirt.engine.ui.common.widget.uicommon.storage.ImportIscsiStorageView) IscsiStorageView(org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiStorageView) ImportIscsiStorageView(org.ovirt.engine.ui.common.widget.uicommon.storage.ImportIscsiStorageView) ImportFcpStorageView(org.ovirt.engine.ui.common.widget.uicommon.storage.ImportFcpStorageView)

Aggregations

IStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel)9 ArrayList (java.util.ArrayList)8 LocalStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel)5 NfsStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel)5 PosixStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel)5 NewEditStorageModelBehavior (org.ovirt.engine.ui.uicommonweb.models.storage.NewEditStorageModelBehavior)3 StorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.StorageModel)3 StorageDomainType (org.ovirt.engine.core.common.businessentities.StorageDomainType)2 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)2 StorageType (org.ovirt.engine.core.common.businessentities.storage.StorageType)2 FcpStorageView (org.ovirt.engine.ui.common.widget.uicommon.storage.FcpStorageView)2 IscsiStorageView (org.ovirt.engine.ui.common.widget.uicommon.storage.IscsiStorageView)2 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)2 FcpStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.FcpStorageModel)2 GlusterStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel)2 ImportFcpStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.ImportFcpStorageModel)2 ImportIscsiStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.ImportIscsiStorageModel)2 IscsiStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.IscsiStorageModel)2 Timer (com.google.gwt.user.client.Timer)1 Arrays (java.util.Arrays)1