use of org.ovirt.engine.ui.webadmin.widget.table.column.StorageDomainStatusColumn in project ovirt-engine by oVirt.
the class SubTabStorageDataCenterView method initTable.
void initTable() {
getTable().enableColumnResizing();
StorageDomainStatusColumn statusColumn = new StorageDomainStatusColumn();
statusColumn.setContextMenuTitle(constants.statusStorageDc());
// $NON-NLS-1$
getTable().addColumn(statusColumn, constants.empty(), "30px");
AbstractTextColumn<StorageDomain> nameColumn = new AbstractLinkColumn<StorageDomain>(new FieldUpdater<StorageDomain, String>() {
@Override
public void update(int index, StorageDomain storageDomain, String value) {
Map<String, String> parameters = new HashMap<>();
parameters.put(FragmentParams.NAME.getName(), storageDomain.getStoragePoolName());
getPlaceTransitionHandler().handlePlaceTransition(WebAdminApplicationPlaces.dataCenterStorageSubTabPlace, parameters);
}
}) {
@Override
public String getValue(StorageDomain object) {
return object.getStoragePoolName();
}
};
nameColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(nameColumn, constants.nameDc(), "600px");
AbstractTextColumn<StorageDomain> domainStatusColumn = new AbstractEnumColumn<StorageDomain, StorageDomainStatus>() {
@Override
protected StorageDomainStatus getRawValue(StorageDomain object) {
return object.getStatus();
}
};
domainStatusColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(domainStatusColumn, constants.domainStatusInDcStorageDc(), "300px");
}
use of org.ovirt.engine.ui.webadmin.widget.table.column.StorageDomainStatusColumn in project ovirt-engine by oVirt.
the class SubTabDataCenterStorageView method initTable.
void initTable() {
getTable().enableColumnResizing();
StorageDomainStatusColumn statusIconColumn = new StorageDomainStatusColumn();
statusIconColumn.setContextMenuTitle(constants.statusIconStorage());
// $NON-NLS-1$
getTable().addColumn(statusIconColumn, constants.empty(), "30px");
StorageDomainAdditionalStatusColumn additionalStatusColumn = new StorageDomainAdditionalStatusColumn();
additionalStatusColumn.setContextMenuTitle(constants.additionalStatusStorage());
// $NON-NLS-1$
getTable().addColumn(additionalStatusColumn, constants.empty(), "60px");
AbstractTextColumn<StorageDomain> nameColumn = new AbstractLinkColumn<StorageDomain>(new FieldUpdater<StorageDomain, String>() {
@Override
public void update(int index, StorageDomain sd, String value) {
Map<String, String> parameters = new HashMap<>();
parameters.put(FragmentParams.NAME.getName(), sd.getName());
getPlaceTransitionHandler().handlePlaceTransition(WebAdminApplicationPlaces.storageGeneralSubTabPlace, parameters);
}
}) {
@Override
public String getValue(StorageDomain object) {
return object.getName();
}
};
nameColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(nameColumn, constants.domainNameStorage(), "160px");
AbstractTextColumn<StorageDomain> typeColumn = new AbstractEnumColumn<StorageDomain, StorageDomainType>() {
@Override
public StorageDomainType getRawValue(StorageDomain object) {
return object.getStorageDomainType();
}
};
typeColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(typeColumn, constants.domainTypeStorage(), "160px");
AbstractTextColumn<StorageDomain> statusColumn = new AbstractEnumColumn<StorageDomain, StorageDomainStatus>() {
@Override
public StorageDomainStatus getRawValue(StorageDomain object) {
return object.getStatus();
}
};
statusColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(statusColumn, constants.statusStorage(), "160px");
AbstractDiskSizeColumn<StorageDomain> freeColumn = new AbstractDiskSizeColumn<StorageDomain>(SizeConverter.SizeUnit.GiB) {
@Override
public Long getRawValue(StorageDomain object) {
return object.getAvailableDiskSize() != null ? object.getAvailableDiskSize() : 0L;
}
};
freeColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(freeColumn, constants.freeSpaceStorage(), "160px");
AbstractDiskSizeColumn<StorageDomain> usedColumn = new AbstractDiskSizeColumn<StorageDomain>(SizeConverter.SizeUnit.GiB) {
@Override
public Long getRawValue(StorageDomain object) {
return object.getUsedDiskSize() != null ? object.getUsedDiskSize() : 0L;
}
};
usedColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(usedColumn, constants.usedSpaceStorage(), "160px");
AbstractDiskSizeColumn<StorageDomain> totalColumn = new AbstractDiskSizeColumn<StorageDomain>(SizeConverter.SizeUnit.GiB) {
@Override
public Long getRawValue(StorageDomain object) {
return object.getTotalDiskSize() != null ? object.getTotalDiskSize() : 0L;
}
};
totalColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(totalColumn, constants.totalSpaceStorage(), "160px");
AbstractTextColumn<StorageDomain> descriptionColumn = new AbstractTextColumn<StorageDomain>() {
@Override
public String getValue(StorageDomain object) {
return object.getDescription();
}
};
descriptionColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(descriptionColumn, constants.domainDescriptionStorage(), "160px");
}
Aggregations