use of org.ovirt.engine.ui.webadmin.widget.table.column.NetworkStatusColumn in project ovirt-engine by oVirt.
the class SubTabClusterNetworkView method initTable.
private void initTable() {
getTable().enableColumnResizing();
NetworkStatusColumn statusIconColumn = new NetworkStatusColumn();
statusIconColumn.setContextMenuTitle(constants.statusIconNetwork());
// $NON-NLS-1$ //$NON-NLS-2$
getTable().addColumn(statusIconColumn, "", "20px");
AbstractTextColumn<Network> nameColumn = new AbstractLinkColumn<Network>(new FieldUpdater<Network, String>() {
@Override
public void update(int index, Network network, String value) {
Map<String, String> parameters = new HashMap<>();
parameters.put(FragmentParams.NAME.getName(), network.getName());
parameters.put(FragmentParams.DATACENTER.getName(), getModelProvider().getMainModel().getSelectedItem().getStoragePoolName());
getPlaceTransitionHandler().handlePlaceTransition(WebAdminApplicationPlaces.networkGeneralSubTabPlace, parameters);
}
}) {
@Override
public String getValue(Network object) {
return object.getName();
}
};
nameColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(nameColumn, constants.nameNetwork(), "400px");
AbstractTextColumn<Network> statusColumn = new AbstractEnumColumn<Network, NetworkStatus>() {
@Override
public NetworkStatus getRawValue(Network object) {
return object.getCluster().getStatus();
}
};
statusColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(statusColumn, constants.statusNetwork(), "100px");
// $NON-NLS-1$
getTable().addColumn(createNetRoleColumn(), constants.roleNetwork(), "90px");
AbstractTextColumn<Network> descColumn = new AbstractTextColumn<Network>() {
@Override
public String getValue(Network object) {
return object.getDescription();
}
};
descColumn.makeSortable();
// $NON-NLS-1$
getTable().addColumn(descColumn, constants.descriptionNetwork(), "400px");
}
Aggregations