use of org.ovirt.engine.ui.webadmin.widget.table.column.StorageDeviceStatusColumn in project ovirt-engine by oVirt.
the class SubTabHostGlusterStorageDevicesView method initTable.
void initTable() {
getTable().enableColumnResizing();
StorageDeviceStatusColumn storageDeviceStatusColumn = new StorageDeviceStatusColumn();
storageDeviceStatusColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(storageDeviceStatusColumn, constants.empty(), "30px");
AbstractTextColumn<StorageDevice> deviceNameColumn = new AbstractTextColumn<StorageDevice>() {
@Override
public String getValue(StorageDevice object) {
return object.getName();
}
};
deviceNameColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(deviceNameColumn, constants.deviceName(), "250px");
AbstractTextColumn<StorageDevice> descriptionColumn = new AbstractTextColumn<StorageDevice>() {
@Override
public String getValue(StorageDevice object) {
return object.getDescription();
}
};
descriptionColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(descriptionColumn, constants.description(), "300px");
AbstractTextColumn<StorageDevice> sizeColumn = new AbstractTextColumn<StorageDevice>() {
@Override
public String getValue(StorageDevice object) {
Pair<SizeUnit, Double> convertedSize = SizeConverter.autoConvert(object.getSize(), SizeUnit.MiB);
// $NON-NLS-1$
return formatSize(convertedSize.getSecond()) + " " + convertedSize.getFirst().toString();
}
};
sizeColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(sizeColumn, constants.size(), "100px");
AbstractTextColumn<StorageDevice> mountPointColumn = new AbstractTextColumn<StorageDevice>() {
@Override
public String getValue(StorageDevice object) {
return object.getMountPoint();
}
};
mountPointColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(mountPointColumn, constants.mountPoint(), "170px");
AbstractTextColumn<StorageDevice> fsTypeColumn = new AbstractTextColumn<StorageDevice>() {
@Override
public String getValue(StorageDevice object) {
return object.getFsType();
}
};
fsTypeColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(fsTypeColumn, constants.fileSystemType(), "170px");
}
Aggregations