Search in sources :

Example 1 with BrickHealInfoColumn

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

the class SubTabVolumeBrickView method initTable.

void initTable() {
    getTable().enableColumnResizing();
    BrickStatusColumn brickStatusColumn = new BrickStatusColumn();
    brickStatusColumn.setContextMenuTitle(constants.statusVolumeBrick());
    brickStatusColumn.makeSortable();
    // $NON-NLS-1$
    getTable().addColumn(brickStatusColumn, constants.empty(), "30px");
    AbstractTextColumn<GlusterBrickEntity> serverColumn = new AbstractTextColumn<GlusterBrickEntity>() {

        @Override
        public String getValue(GlusterBrickEntity brick) {
            return brick.getServerName();
        }
    };
    serverColumn.makeSortable();
    // $NON-NLS-1$
    getTable().addColumn(serverColumn, constants.serverVolumeBrick(), "300px");
    AbstractTextColumn<GlusterBrickEntity> directoryColumn = new AbstractTextColumn<GlusterBrickEntity>() {

        @Override
        public String getValue(GlusterBrickEntity brick) {
            String qualifiedName = brick.getQualifiedName();
            if (brick.getIsArbiter()) {
                // $NON-NLS-1$ //$NON-NLS-2$
                qualifiedName += " (" + constants.arbiter() + ")";
            }
            return qualifiedName;
        }
    };
    directoryColumn.makeSortable();
    // $NON-NLS-1$
    getTable().addColumn(directoryColumn, constants.brickDirectoryVolumeBrick(), "400px");
    getTable().addColumn(new Column<GlusterBrickEntity, BrickProperties>(new BrickCapacityCell()) {

        @Override
        public BrickProperties getValue(GlusterBrickEntity object) {
            return object.getBrickProperties();
        }
    }, constants.volumeCapacity(), // $NON-NLS-1$
    "100px");
    BrickHealInfoColumn healInfoColumn = new BrickHealInfoColumn();
    // $NON-NLS-1$
    getTable().addColumn(healInfoColumn, constants.healInfo(), "110px");
    getTable().addColumn(new VolumeActivityColumn<GlusterBrickEntity>(getActivityCell()), constants.activitiesOnVolume(), // $NON-NLS-1$
    "100px");
}
Also used : GlusterBrickEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity) BrickCapacityCell(org.ovirt.engine.ui.webadmin.widget.table.column.BrickCapacityCell) AbstractTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn) BrickStatusColumn(org.ovirt.engine.ui.webadmin.widget.table.column.BrickStatusColumn) BrickHealInfoColumn(org.ovirt.engine.ui.webadmin.widget.table.column.BrickHealInfoColumn) BrickProperties(org.ovirt.engine.core.common.businessentities.gluster.BrickProperties)

Example 2 with BrickHealInfoColumn

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

the class SubTabHostBrickView method initTable.

void initTable() {
    getTable().enableColumnResizing();
    BrickStatusColumn brickStatusColumn = new BrickStatusColumn();
    brickStatusColumn.makeSortable();
    // $NON-NLS-1$
    getTable().addColumn(brickStatusColumn, constants.empty(), "30px");
    AbstractTextColumn<GlusterBrickEntity> volNameColumn = new AbstractTextColumn<GlusterBrickEntity>() {

        @Override
        public String getValue(GlusterBrickEntity object) {
            return object.getVolumeName();
        }
    };
    volNameColumn.makeSortable();
    getTable().addColumn(volNameColumn, constants.volumeName());
    AbstractTextColumn<GlusterBrickEntity> brickDirColumn = new AbstractTextColumn<GlusterBrickEntity>() {

        @Override
        public String getValue(GlusterBrickEntity object) {
            return object.getBrickDirectory();
        }
    };
    brickDirColumn.makeSortable();
    // $NON-NLS-1$
    getTable().addColumn(brickDirColumn, constants.brickDirectoryBricks(), "220px");
    BrickHealInfoColumn healInfoColumn = new BrickHealInfoColumn();
    // $NON-NLS-1$
    getTable().addColumn(healInfoColumn, constants.healInfo(), "110px");
}
Also used : GlusterBrickEntity(org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity) AbstractTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn) BrickStatusColumn(org.ovirt.engine.ui.webadmin.widget.table.column.BrickStatusColumn) BrickHealInfoColumn(org.ovirt.engine.ui.webadmin.widget.table.column.BrickHealInfoColumn)

Aggregations

GlusterBrickEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity)2 AbstractTextColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn)2 BrickHealInfoColumn (org.ovirt.engine.ui.webadmin.widget.table.column.BrickHealInfoColumn)2 BrickStatusColumn (org.ovirt.engine.ui.webadmin.widget.table.column.BrickStatusColumn)2 BrickProperties (org.ovirt.engine.core.common.businessentities.gluster.BrickProperties)1 BrickCapacityCell (org.ovirt.engine.ui.webadmin.widget.table.column.BrickCapacityCell)1