use of org.ovirt.engine.ui.webadmin.widget.table.column.GlusterVolumeSnapshotStatusColumn in project ovirt-engine by oVirt.
the class SubTabGlusterVolumeSnapshotView method initTable.
void initTable() {
getTable().enableColumnResizing();
GlusterVolumeSnapshotStatusColumn snapshotStatusColumn = new GlusterVolumeSnapshotStatusColumn();
snapshotStatusColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(snapshotStatusColumn, constants.empty(), "30px");
AbstractTextColumn<GlusterVolumeSnapshotEntity> snapshotNameColumn = new AbstractTextColumn<GlusterVolumeSnapshotEntity>() {
@Override
public String getValue(GlusterVolumeSnapshotEntity snapshot) {
return snapshot.getSnapshotName();
}
};
snapshotNameColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(snapshotNameColumn, constants.volumeSnapshotName(), "300px");
AbstractTextColumn<GlusterVolumeSnapshotEntity> descriptionColumn = new AbstractTextColumn<GlusterVolumeSnapshotEntity>() {
@Override
public String getValue(GlusterVolumeSnapshotEntity snapshot) {
return snapshot.getDescription();
}
};
descriptionColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(descriptionColumn, constants.volumeSnapshotDescription(), "400px");
AbstractTextColumn<GlusterVolumeSnapshotEntity> creationTimeColumn = new AbstractTextColumn<GlusterVolumeSnapshotEntity>() {
@Override
public String getValue(GlusterVolumeSnapshotEntity snapshot) {
// $NON-NLS-1$
DateTimeFormat df = DateTimeFormat.getFormat("yyyy-MM-dd, HH:mm:ss");
return df.format(snapshot.getCreatedAt());
}
};
creationTimeColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(creationTimeColumn, constants.volumeSnapshotCreationTime(), "400px");
}
Aggregations