Search in sources :

Example 6 with VolumeStatus

use of org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus in project ovirt-engine by oVirt.

the class VolumeStatusCell method onBrowserEvent.

@Override
public void onBrowserEvent(Context context, Element parent, GlusterVolumeEntity volume, NativeEvent event, ValueUpdater<GlusterVolumeEntity> valueUpdater) {
    super.onBrowserEvent(context, parent, volume, event, valueUpdater);
    VolumeStatus status = GlusterVolumeUtils.getVolumeStatus(volume);
    if (BrowserEvents.CLICK.equals(event.getType()) && onClickCommand != null && (status == VolumeStatus.ALL_BRICKS_DOWN || status == VolumeStatus.SOME_BRICKS_DOWN)) {
        onClickCommand.execute();
    }
}
Also used : VolumeStatus(org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus)

Aggregations

VolumeStatus (org.ovirt.engine.ui.frontend.utils.GlusterVolumeUtils.VolumeStatus)6 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)3 ArrayList (java.util.ArrayList)2 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)2 ImageResource (com.google.gwt.resources.client.ImageResource)1 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 GlusterVolumeActionParameters (org.ovirt.engine.core.common.action.gluster.GlusterVolumeActionParameters)1 GlusterAsyncTask (org.ovirt.engine.core.common.asynctasks.gluster.GlusterAsyncTask)1