use of org.apache.syncope.client.console.tasks.SchedTasks in project syncope by apache.
the class TopologyTogglePanel method getSyncopeFragment.
private Fragment getSyncopeFragment(final PageReference pageRef) {
Fragment fragment = new Fragment("actions", "syncopeActions", this);
AjaxLink<String> reload = new IndicatingOnConfirmAjaxLink<String>("reload", "connectors.confirm.reload", true) {
private static final long serialVersionUID = -2075933173666007020L;
@Override
public void onClick(final AjaxRequestTarget target) {
try {
connectorRestClient.reload();
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
} catch (Exception e) {
LOG.error("While reloading all connectors", e);
SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
}
((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
}
};
fragment.add(reload);
MetaDataRoleAuthorizationStrategy.authorize(reload, RENDER, StandardEntitlement.CONNECTOR_RELOAD);
AjaxLink<String> tasks = new IndicatingAjaxLink<String>("tasks") {
private static final long serialVersionUID = 3776750333491622263L;
@Override
public void onClick(final AjaxRequestTarget target) {
target.add(schedTaskModal.setContent(new SchedTasks(schedTaskModal, pageRef)));
schedTaskModal.header(new ResourceModel("task.custom.list"));
schedTaskModal.show(true);
}
@Override
public String getAjaxIndicatorMarkupId() {
return Constants.VEIL_INDICATOR_MARKUP_ID;
}
};
fragment.add(tasks);
MetaDataRoleAuthorizationStrategy.authorize(tasks, RENDER, StandardEntitlement.TASK_LIST);
return fragment;
}
Aggregations