use of org.apache.syncope.common.lib.to.ReportTO in project syncope by apache.
the class ReportDirectoryPanel method getColumns.
@Override
protected List<IColumn<ReportTO, String>> getColumns() {
final List<IColumn<ReportTO, String>> columns = new ArrayList<>();
columns.add(new KeyPropertyColumn<>(new StringResourceModel("key", this), "key"));
columns.add(new PropertyColumn<>(new StringResourceModel("name", this), "name", "name"));
columns.add(new DatePropertyColumn<>(new StringResourceModel("lastExec", this), "lastExec", "lastExec"));
columns.add(new DatePropertyColumn<>(new StringResourceModel("nextExec", this), "nextExec", "nextExec"));
columns.add(new DatePropertyColumn<>(new StringResourceModel("start", this), "start", "start"));
columns.add(new DatePropertyColumn<>(new StringResourceModel("end", this), "end", "end"));
columns.add(new PropertyColumn<>(new StringResourceModel("latestExecStatus", this), "latestExecStatus", "latestExecStatus"));
columns.add(new BooleanPropertyColumn<>(new StringResourceModel("active", this), "active", "active"));
columns.add(new AbstractColumn<ReportTO, String>(new Model<>(""), "running") {
private static final long serialVersionUID = 4209532514416998046L;
@Override
public void populateItem(final Item<ICellPopulator<ReportTO>> cellItem, final String componentId, final IModel<ReportTO> rowModel) {
JobTO jobTO = restClient.getJob(rowModel.getObject().getKey());
JobActionPanel panel = new JobActionPanel(componentId, jobTO, false, ReportDirectoryPanel.this, pageRef);
MetaDataRoleAuthorizationStrategy.authorize(panel, WebPage.ENABLE, String.format("%s,%s", StandardEntitlement.TASK_EXECUTE, StandardEntitlement.TASK_UPDATE));
cellItem.add(panel);
}
@Override
public String getCssClass() {
return "col-xs-1";
}
});
return columns;
}
Aggregations