use of de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel in project syncope by apache.
the class ReconciliationWidget method buildExecFragment.
private Fragment buildExecFragment() {
Fragment execFragment = new Fragment("reportResult", "execFragment", this);
execFragment.setOutputMarkupId(true);
Pair<List<ProgressBean>, ReconciliationReport> execResult;
try {
execResult = parseReconciliationReportExec();
} catch (Exception e) {
LOG.error("Could not parse the reconciliation report result", e);
execResult = Pair.of(Collections.<ProgressBean>emptyList(), new ReconciliationReport(new Date()));
}
final List<ProgressBean> progressBeans = execResult.getLeft();
final ReconciliationReport report = execResult.getRight();
List<ITab> tabs = new ArrayList<>();
tabs.add(new AbstractTab(new ResourceModel("summary")) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new ProgressesPanel(panelId, report.getRun(), progressBeans);
}
});
tabs.add(new AbstractTab(Model.of(AnyTypeKind.USER.name())) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new AnysReconciliationPanel(panelId, report.getUsers(), pageRef);
}
});
tabs.add(new AbstractTab(Model.of(AnyTypeKind.GROUP.name())) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new AnysReconciliationPanel(panelId, report.getGroups(), pageRef);
}
});
for (final Anys anys : report.getAnyObjects()) {
tabs.add(new AbstractTab(Model.of(anys.getAnyType())) {
private static final long serialVersionUID = -6815067322125799251L;
@Override
public Panel getPanel(final String panelId) {
return new AnysReconciliationPanel(panelId, anys, pageRef);
}
});
}
execFragment.add(new AjaxBootstrapTabbedPanel<>("execResult", tabs));
return execFragment;
}
Aggregations