Search in sources :

Example 1 with GlusterStorageModel

use of org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel 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 2 with GlusterStorageModel

use of org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel 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 3 with GlusterStorageModel

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

the class AsyncDataProvider method getFileDataStorageModels.

public List<IStorageModel> getFileDataStorageModels() {
    ArrayList<IStorageModel> models = new ArrayList<>();
    NfsStorageModel nfsDataModel = new NfsStorageModel();
    models.add(nfsDataModel);
    PosixStorageModel posixDataModel = new PosixStorageModel();
    models.add(posixDataModel);
    GlusterStorageModel GlusterDataModel = new GlusterStorageModel();
    models.add(GlusterDataModel);
    LocalStorageModel localDataModel = new LocalStorageModel();
    models.add(localDataModel);
    addTypeToStorageModels(StorageDomainType.Data, 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 GlusterStorageModel

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

the class GlusterStorageView method edit.

@Override
public void edit(GlusterStorageModel object) {
    final GlusterStorageModel glusterStorageModel = object;
    driver.edit(object);
    glusterVolumesEditor.asEditor().setValue(object.getGlusterVolumes().getSelectedItem());
    pathExampleLabel.setVisible(object.getPath().getIsAvailable() && object.getPath().getIsChangable());
    glusterStorageModel.getLinkGlusterVolume().getEntityChangedEvent().addListener((ev, sender, args) -> {
        // Editor, needs the example
        boolean showEditor = !glusterStorageModel.getLinkGlusterVolume().getEntity();
        pathEditorRow.setVisible(showEditor);
        pathExampleLabel.setVisible(showEditor);
        // List box, shouldn't have an example since you can only select one.
        glusterVolumesRow.setVisible(!showEditor);
    });
}
Also used : GlusterStorageModel(org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel)

Aggregations

GlusterStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.GlusterStorageModel)4 ArrayList (java.util.ArrayList)3 IStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.IStorageModel)3 LocalStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.LocalStorageModel)3 NfsStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.NfsStorageModel)3 PosixStorageModel (org.ovirt.engine.ui.uicommonweb.models.storage.PosixStorageModel)3