Search in sources :

Example 1 with GlusterHookSyncStatusColumn

use of org.ovirt.engine.ui.webadmin.widget.table.column.GlusterHookSyncStatusColumn in project ovirt-engine by oVirt.

the class SubTabClusterGlusterHookView method initTable.

void initTable() {
    getTable().enableColumnResizing();
    getTable().addColumn(new GlusterHookSyncStatusColumn(), constants.empty(), // $NON-NLS-1$
    "10px");
    AbstractTextColumn<GlusterHookEntity> nameColumn = new AbstractTextColumn<GlusterHookEntity>() {

        @Override
        public String getValue(GlusterHookEntity object) {
            return object.getName();
        }
    };
    // $NON-NLS-1$
    getTable().addColumn(nameColumn, constants.nameHook(), "200px");
    AbstractTextColumn<GlusterHookEntity> statusColumn = new AbstractEnumColumn<GlusterHookEntity, GlusterHookStatus>() {

        @Override
        protected GlusterHookStatus getRawValue(GlusterHookEntity object) {
            return object.getStatus();
        }
    };
    // $NON-NLS-1$
    getTable().addColumn(statusColumn, constants.statusHook(), "150px");
    AbstractTextColumn<GlusterHookEntity> glusterCommandColumn = new AbstractTextColumn<GlusterHookEntity>() {

        @Override
        public String getValue(GlusterHookEntity object) {
            return object.getGlusterCommand();
        }
    };
    getTable().addColumn(glusterCommandColumn, constants.glusterVolumeEventHook(), // $NON-NLS-1$;
    "100px");
    AbstractTextColumn<GlusterHookEntity> stageColumn = new AbstractEnumColumn<GlusterHookEntity, GlusterHookStage>() {

        @Override
        protected GlusterHookStage getRawValue(GlusterHookEntity object) {
            return object.getStage();
        }
    };
    // $NON-NLS-1$
    getTable().addColumn(stageColumn, constants.stageHook(), "100px");
    AbstractTextColumn<GlusterHookEntity> contentTypeColumn = new AbstractEnumColumn<GlusterHookEntity, GlusterHookContentType>() {

        @Override
        protected GlusterHookContentType getRawValue(GlusterHookEntity object) {
            return object.getContentType();
        }
    };
    // $NON-NLS-1$
    getTable().addColumn(contentTypeColumn, constants.contentTypeHook(), "150px");
}
Also used : AbstractEnumColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractEnumColumn) GlusterHookEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity) GlusterHookSyncStatusColumn(org.ovirt.engine.ui.webadmin.widget.table.column.GlusterHookSyncStatusColumn) AbstractTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn)

Aggregations

GlusterHookEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity)1 AbstractEnumColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractEnumColumn)1 AbstractTextColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn)1 GlusterHookSyncStatusColumn (org.ovirt.engine.ui.webadmin.widget.table.column.GlusterHookSyncStatusColumn)1