Search in sources :

Example 1 with RefreshActionIcon

use of org.ovirt.engine.ui.common.widget.dialog.RefreshActionIcon in project ovirt-engine by oVirt.

the class VolumeProfileStatisticsPopupView method initEditors.

private void initEditors() {
    nfsRefreshIcon = new RefreshActionIcon(SafeHtmlUtils.EMPTY_SAFE_HTML);
    brickRefreshIcon = new RefreshActionIcon(SafeHtmlUtils.EMPTY_SAFE_HTML);
    bricks = new ListModelListBoxEditor<>(new NameRenderer<BrickProfileDetails>());
    nfsServers = new ListModelListBoxEditor<>(new NameRenderer<GlusterVolumeProfileStats>());
    volumeProfileStats = new EntityModelCellTable<>(false, true);
    volumeProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            return entity.getName();
        }
    }, constants.fileOperation());
    volumeProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            return entity.getHits() + "";
        }
    }, constants.fOpInvocationCount());
    volumeProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            // $NON-NLS-1$
            return entity.getMaxLatencyFormatted().getFirst() + " " + entity.getMaxLatencyFormatted().getSecond();
        }
    }, constants.fOpMaxLatency());
    volumeProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            // $NON-NLS-1$
            return entity.getMinLatencyFormatted().getFirst() + " " + entity.getMinLatencyFormatted().getSecond();
        }
    }, constants.fOpMinLatency());
    volumeProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            // $NON-NLS-1$
            return entity.getAvgLatencyFormatted().getFirst() + " " + entity.getAvgLatencyFormatted().getSecond();
        }
    }, constants.fOpAvgLatency());
    nfsServerProfileStats = new EntityModelCellTable<>(false, true);
    nfsServerProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            return entity.getName();
        }
    }, constants.fileOperation());
    nfsServerProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            return entity.getHits() + "";
        }
    }, constants.fOpInvocationCount());
    nfsServerProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            // $NON-NLS-1$
            return entity.getMaxLatencyFormatted().getFirst() + " " + entity.getMaxLatencyFormatted().getSecond();
        }
    }, constants.fOpMaxLatency());
    nfsServerProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            // $NON-NLS-1$
            return entity.getMinLatencyFormatted().getFirst() + " " + entity.getMinLatencyFormatted().getSecond();
        }
    }, constants.fOpMinLatency());
    nfsServerProfileStats.addColumn(new AbstractEntityModelTextColumn<FopStats>() {

        @Override
        protected String getText(FopStats entity) {
            // $NON-NLS-1$
            return entity.getAvgLatencyFormatted().getFirst() + " " + entity.getAvgLatencyFormatted().getSecond();
        }
    }, constants.fOpAvgLatency());
}
Also used : RefreshActionIcon(org.ovirt.engine.ui.common.widget.dialog.RefreshActionIcon) FopStats(org.ovirt.engine.core.common.businessentities.gluster.FopStats) NameRenderer(org.ovirt.engine.ui.common.widget.renderer.NameRenderer)

Aggregations

FopStats (org.ovirt.engine.core.common.businessentities.gluster.FopStats)1 RefreshActionIcon (org.ovirt.engine.ui.common.widget.dialog.RefreshActionIcon)1 NameRenderer (org.ovirt.engine.ui.common.widget.renderer.NameRenderer)1