You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2016/01/28 18:29:03 UTC
[2/2] syncope git commit: [SYNCOPE-743] providing sched tasks
management
[SYNCOPE-743] providing sched tasks management
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a4a9ef56
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a4a9ef56
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a4a9ef56
Branch: refs/heads/master
Commit: a4a9ef568d29a591055dfb7fea625cc9bea28e5b
Parents: fa28888
Author: fmartelli <fa...@gmail.com>
Authored: Thu Jan 28 18:28:49 2016 +0100
Committer: fmartelli <fa...@gmail.com>
Committed: Thu Jan 28 18:28:49 2016 +0100
----------------------------------------------------------------------
.../client/console/commons/Constants.java | 2 +
.../console/commons/DateFormatROModel.java | 50 ++++
.../console/commons/TaskDataProvider.java | 61 +++++
.../client/console/rest/TaskRestClient.java | 14 +
.../console/tasks/AbstractSchedTaskDetails.java | 199 ++++++++++++++
.../client/console/tasks/AbstractTasks.java | 49 ++++
.../client/console/tasks/CrontabPanel.java | 186 +++++++++++++
.../tasks/PropagationTaskSearchResultPanel.java | 85 +-----
.../client/console/tasks/PropagationTasks.java | 21 +-
.../ProvisioningTaskSearchResultPanel.java | 113 ++++++++
.../tasks/PushTaskSearchResultPanel.java | 40 +++
.../client/console/tasks/SchedTaskDetails.java | 43 +++
.../tasks/SchedTaskSearchResultPanel.java | 270 +++++++++++++++++++
.../client/console/tasks/SchedTasks.java | 49 ++++
.../tasks/SyncTaskSearchResultPanel.java | 40 +++
.../console/tasks/TaskSearchResultPanel.java | 104 +++++++
.../console/topology/TopologyTogglePanel.java | 5 +-
.../META-INF/resources/css/topology.css | 16 ++
.../tasks/AbstractSchedTaskDetails$Profile.html | 30 +++
.../AbstractSchedTaskDetails$Profile.properties | 27 ++
...stractSchedTaskDetails$Profile_it.properties | 27 ++
...actSchedTaskDetails$Profile_pt_BR.properties | 27 ++
.../AbstractSchedTaskDetails$Schedule.html | 26 ++
.../tasks/AbstractSchedTaskDetails.properties | 20 ++
.../AbstractSchedTaskDetails_it.properties | 20 ++
.../AbstractSchedTaskDetails_pt_BR.properties | 20 ++
.../client/console/tasks/AbstractTasks.html | 24 ++
.../client/console/tasks/CrontabPanel.html | 37 +++
.../console/tasks/CrontabPanel.properties | 25 ++
.../console/tasks/CrontabPanel_it.properties | 25 ++
.../console/tasks/CrontabPanel_pt_BR.properties | 25 ++
...PropagationTaskDetails$Profile_it.properties | 18 ++
...pagationTaskDetails$Profile_pt_BR.properties | 18 ++
.../PropagationTaskSearchResultPanel.properties | 20 +-
...opagationTaskSearchResultPanel_it.properties | 22 ++
...gationTaskSearchResultPanel_pt_BR.properties | 22 ++
.../client/console/tasks/PropagationTasks.html | 24 --
.../tasks/SchedTaskSearchResultPanel.properties | 22 ++
.../SchedTaskSearchResultPanel_it.properties | 22 ++
.../SchedTaskSearchResultPanel_pt_BR.properties | 22 ++
.../client/console/tasks/TaskDetails.properties | 26 --
.../tasks/TaskSearchResultPanel.properties | 22 ++
.../tasks/TaskSearchResultPanel_it.properties | 22 ++
.../TaskSearchResultPanel_pt_BR.properties | 22 ++
.../topology/TopologyTogglePanel.properties | 4 +-
.../topology/TopologyTogglePanel_it.properties | 6 +-
.../TopologyTogglePanel_pt_BR.properties | 6 +-
.../markup/html/form/ActionLinksPanel.html | 2 +-
48 files changed, 1808 insertions(+), 172 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
index 3a1e72f..1d6c028 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java
@@ -106,6 +106,8 @@ public final class Constants {
public static final String PREF_SYNC_TASKS_PAGINATOR_ROWS = "synctasks.paginator.rows";
+ public static final String PREF_PUSH_TASKS_PAGINATOR_ROWS = "pushtasks.paginator.rows";
+
public static final String PREF_TODO_PAGINATOR_ROWS = "todo.paginator.rows";
public static final String PREF_REPORT_PAGINATOR_ROWS = "report.paginator.rows";
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
new file mode 100644
index 0000000..12f2d95
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/DateFormatROModel.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.commons;
+
+import java.util.Date;
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+
+public class DateFormatROModel implements IModel<String> {
+
+ private static final long serialVersionUID = 6677274580927636121L;
+
+ private final PropertyModel model;
+
+ public DateFormatROModel(final PropertyModel model) {
+ this.model = model;
+ }
+
+ @Override
+ public String getObject() {
+ return model.getObject() == null
+ ? ""
+ : SyncopeConsoleSession.get().getDateFormat().format((Date) model.getObject());
+ }
+
+ @Override
+ public void setObject(final String object) {
+ }
+
+ @Override
+ public void detach() {
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java
new file mode 100644
index 0000000..a639b1a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/TaskDataProvider.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.commons;
+
+import org.apache.syncope.client.console.rest.TaskRestClient;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.types.TaskType;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+
+public abstract class TaskDataProvider<T extends AbstractTaskTO> extends SearchableDataProvider<T> {
+
+ private static final long serialVersionUID = -20112718133295756L;
+
+ private final SortableDataProviderComparator<T> comparator;
+
+ private final TaskType id;
+
+ private final TaskRestClient taskRestClient;
+
+ public TaskDataProvider(final int paginatorRows, final TaskType id, final TaskRestClient taskRestClient) {
+ super(paginatorRows);
+ this.taskRestClient = taskRestClient;
+
+ //Default sorting
+ setSort("key", SortOrder.DESCENDING);
+ comparator = new SortableDataProviderComparator<T>(this);
+ this.id = id;
+ }
+
+ public SortableDataProviderComparator<T> getComparator() {
+ return comparator;
+ }
+
+ @Override
+ public long size() {
+ return taskRestClient.count(id);
+ }
+
+ @Override
+ public IModel<T> model(final T object) {
+ return new CompoundPropertyModel<>(object);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
index bf7a894..668aae5 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
@@ -94,6 +94,20 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
getResult();
}
+ @SuppressWarnings("unchecked")
+ public <T extends AbstractTaskTO> List<T> list(
+ final String resource,
+ final Class<T> reference,
+ final int page,
+ final int size,
+ final SortParam<String> sort) {
+
+ return (List<T>) getService(TaskService.class).
+ list(new TaskQuery.Builder().type(getTaskType(reference)).page(page).size(size).resource(resource).
+ orderBy(toOrderBy(sort)).build()).
+ getResult();
+ }
+
public List<TaskExecTO> listExecutions(final Long taskId, final int page, final int size) {
return getService(TaskService.class).
listExecutions(new TaskExecQuery.Builder().key(taskId).page(page).size(size).build()).getResult();
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.java
new file mode 100644
index 0000000..6a6abbc
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.java
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.syncope.client.console.commons.DateFormatROModel;
+import org.apache.syncope.client.console.rest.TaskRestClient;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.common.lib.to.PushTaskTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
+import org.apache.wicket.extensions.markup.html.tabs.ITab;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+/**
+ * Modal window with Task form (to stop and start execution).
+ *
+ * @param <T>
+ */
+public abstract class AbstractSchedTaskDetails<T extends SchedTaskTO> extends TaskDetails<T> {
+
+ private static final long serialVersionUID = 2892005971093059242L;
+
+ protected CrontabPanel crontab;
+
+ public AbstractSchedTaskDetails(final T taskTO, final PageReference pageRef) {
+ super(taskTO, pageRef);
+ }
+
+ @Override
+ protected List<ITab> buildTabList(final T taskTO, final PageReference pageRef) {
+ final List<ITab> res = new ArrayList<>();
+ res.add(new AbstractTab(new Model<>("profile")) {
+
+ private static final long serialVersionUID = -5861786415855103559L;
+
+ @Override
+ public WebMarkupContainer getPanel(final String panelId) {
+ return new AbstractSchedTaskDetails.Profile(panelId, taskTO);
+ }
+ });
+ res.add(new AbstractTab(new Model<>("schedule")) {
+
+ private static final long serialVersionUID = -5861786415855103559L;
+
+ @Override
+ public WebMarkupContainer getPanel(final String panelId) {
+ return new Schedule(panelId, taskTO);
+ }
+ });
+ return res;
+ }
+
+ public class Schedule extends Panel {
+
+ private static final long serialVersionUID = -785981096328637758L;
+
+ public Schedule(final String id, final SchedTaskTO taskTO) {
+ super(id);
+ add(new CrontabPanel(
+ "schedule", new PropertyModel<String>(taskTO, "cronExpression"), taskTO.getCronExpression()));
+ }
+
+ }
+
+ public class Profile extends Panel {
+
+ private static final long serialVersionUID = -3043839139187792810L;
+
+ private final IModel<List<String>> classNames = new LoadableDetachableModel<List<String>>() {
+
+ private static final long serialVersionUID = 5275935387613157437L;
+
+ @Override
+ protected List<String> load() {
+ return new ArrayList<>(new TaskRestClient().getJobClasses());
+ }
+ };
+
+ public Profile(final String id, final SchedTaskTO taskTO) {
+ super(id);
+
+ final AjaxTextFieldPanel name
+ = new AjaxTextFieldPanel("name", "name", new PropertyModel<String>(taskTO, "name"));
+ name.setEnabled(true);
+ add(name);
+
+ final AjaxTextFieldPanel description = new AjaxTextFieldPanel("description", "description",
+ new PropertyModel<String>(taskTO, "description"));
+ description.setEnabled(true);
+ add(description);
+
+ final AjaxDropDownChoicePanel<String> className = new AjaxDropDownChoicePanel<String>(
+ "jobDelegateClassName",
+ getString("jobDelegateClassName"),
+ new PropertyModel<String>(taskTO, "jobDelegateClassName"));
+
+ className.setChoices(classNames.getObject());
+ className.addRequiredLabel();
+ className.setEnabled(taskTO.getKey() == 0);
+ className.setStyleSheet("ui-widget-content ui-corner-all long_dynamicsize");
+ add(className);
+
+ if (taskTO instanceof SyncTaskTO || taskTO instanceof PushTaskTO) {
+ className.setEnabled(false).setVisible(false);
+ }
+
+ final AjaxTextFieldPanel lastExec = new AjaxTextFieldPanel("lastExec", getString("lastExec"),
+ new DateFormatROModel(new PropertyModel<String>(taskTO, "lastExec")));
+ lastExec.setEnabled(false);
+ add(lastExec);
+
+ final AjaxTextFieldPanel nextExec = new AjaxTextFieldPanel("nextExec", getString("nextExec"),
+ new DateFormatROModel(new PropertyModel<String>(taskTO, "nextExec")));
+ nextExec.setEnabled(false);
+ add(nextExec);
+//
+// final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(APPLY)) {
+//
+// private static final long serialVersionUID = -958724007591692537L;
+//
+// @Override
+// protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+// SchedTaskTO taskTO = (SchedTaskTO) form.getModelObject();
+// taskTO.setCronExpression(StringUtils.hasText(taskTO.getCronExpression())
+// ? crontab.getCronExpression()
+// : null);
+//
+// try {
+// submitAction(taskTO);
+//
+// ((BasePage) pageRef.getPage()).setModalResult(true);
+//
+// window.close(target);
+// } catch (SyncopeClientException e) {
+// LOG.error("While creating or updating task", e);
+// error(getString(Constants.ERROR) + ": " + e.getMessage());
+// feedbackPanel.refresh(target);
+// }
+// }
+//
+// @Override
+// protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+// feedbackPanel.refresh(target);
+// }
+// };
+//
+// final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
+//
+// private static final long serialVersionUID = -958724007591692537L;
+//
+// @Override
+// protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+// window.close(target);
+// }
+// };
+//
+// cancel.setDefaultFormProcessing(false);
+//
+// if (taskTO.getId() > 0) {
+// MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getEntitlement(TASKS,
+// "update"));
+// } else {
+// MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getEntitlement(TASKS,
+// "create"));
+// }
+//
+// form.add(submit);
+// form.add(cancel);
+ }
+ }
+
+// protected abstract void submitAction(SchedTaskTO taskTO);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractTasks.java
new file mode 100644
index 0000000..93b2a2a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/AbstractTasks.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import java.io.Serializable;
+import org.apache.syncope.client.console.panels.ModalPanel;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.Panel;
+
+public abstract class AbstractTasks extends Panel implements ModalPanel<Serializable> {
+
+ private static final long serialVersionUID = -4013796607157549641L;
+
+ public AbstractTasks(final String id) {
+ super(id);
+ }
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void onError(final AjaxRequestTarget target, final Form<?> form) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Serializable getItem() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
new file mode 100644
index 0000000..526dd6f
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/CrontabPanel.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import java.util.Arrays;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.client.console.wicket.markup.html.form.SelectChoiceRenderer;
+import org.apache.syncope.client.console.wicket.markup.html.form.SelectOption;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.PropertyModel;
+
+public class CrontabPanel extends Panel {
+
+ private static final long serialVersionUID = 7879593326085337650L;
+
+ private final AjaxTextFieldPanel seconds;
+
+ private final AjaxTextFieldPanel minutes;
+
+ private final AjaxTextFieldPanel hours;
+
+ private final AjaxTextFieldPanel daysOfMonth;
+
+ private final AjaxTextFieldPanel months;
+
+ private final AjaxTextFieldPanel daysOfWeek;
+
+ public CrontabPanel(final String id, final PropertyModel<String> cronExpressionModel, final String cronExpression) {
+ super(id);
+ setOutputMarkupId(true);
+
+ final SelectOption[] cronTemplates = {
+ new SelectOption(getString("selOpt1"), "UNSCHEDULE"),
+ new SelectOption(getString("selOpt2"), "0 0/5 * * * ?"),
+ new SelectOption(getString("selOpt3"), "0 0 12 * * ?"),
+ new SelectOption(getString("selOpt4"), "0 0 0 1 * ?"),
+ new SelectOption(getString("selOpt5"), "0 0 0 L * ?"),
+ new SelectOption(getString("selOpt6"), "0 0 0 ? * 2")
+ };
+
+ final AjaxDropDownChoicePanel<SelectOption> cronTemplateChooser = new AjaxDropDownChoicePanel<SelectOption>(
+ "cronTemplateChooser", "cronTemplateChooser", new Model<SelectOption>());
+
+ cronTemplateChooser.setNullValid(false);
+ cronTemplateChooser.setPlaceholder("chooseForTemplate");
+
+ cronTemplateChooser.getField().setModel(new IModel<SelectOption>() {
+
+ private static final long serialVersionUID = 6762568283146531315L;
+
+ @Override
+ public SelectOption getObject() {
+ SelectOption result = null;
+ for (SelectOption so : cronTemplates) {
+ if (so.getKeyValue().equals(cronExpressionModel.getObject())) {
+ result = so;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void setObject(final SelectOption object) {
+ cronExpressionModel.setObject(object == null || object.equals(cronTemplates[0])
+ ? null
+ : object.toString());
+ }
+
+ @Override
+ public void detach() {
+ // no detach
+ }
+ });
+ cronTemplateChooser.setChoices(Arrays.asList(cronTemplates));
+ cronTemplateChooser.setChoiceRenderer(new SelectChoiceRenderer<SelectOption>());
+ add(cronTemplateChooser);
+
+ seconds = new AjaxTextFieldPanel(
+ "seconds", "seconds", new Model<String>(getCronField(cronExpression, 0)));
+ add(seconds.hideLabel());
+
+ minutes = new AjaxTextFieldPanel(
+ "minutes", "minutes", new Model<String>(getCronField(cronExpression, 1)));
+ add(minutes.hideLabel());
+
+ hours = new AjaxTextFieldPanel(
+ "hours", "hours", new Model<String>(getCronField(cronExpression, 2)));
+ add(hours.hideLabel());
+
+ daysOfMonth = new AjaxTextFieldPanel(
+ "daysOfMonth", "daysOfMonth", new Model<String>(getCronField(cronExpression, 3)));
+ add(daysOfMonth.hideLabel());
+
+ months = new AjaxTextFieldPanel(
+ "months", "months", new Model<String>(getCronField(cronExpression, 4)));
+ add(months.hideLabel());
+
+ daysOfWeek = new AjaxTextFieldPanel(
+ "daysOfWeek", "daysOfWeek", new Model<String>(getCronField(cronExpression, 5)));
+ add(daysOfWeek.hideLabel());
+
+ final FormComponent<SelectOption> component = cronTemplateChooser.getField();
+
+ cronTemplateChooser.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+ private static final long serialVersionUID = -1107858522700306810L;
+
+ @Override
+ protected void onUpdate(final AjaxRequestTarget target) {
+ seconds.setModelObject(getCronField(component, 0));
+ minutes.setModelObject(getCronField(component, 1));
+ hours.setModelObject(getCronField(component, 2));
+ daysOfMonth.setModelObject(getCronField(component, 3));
+ months.setModelObject(getCronField(component, 4));
+ daysOfWeek.setModelObject(getCronField(component, 5));
+ target.add(CrontabPanel.this);
+ }
+ });
+ }
+
+ private String getCronField(final FormComponent<?> formComponent, final int field) {
+ String cronField = null;
+
+ if (formComponent != null) {
+ cronField = getCronField(formComponent.getInput(), field);
+ }
+
+ return cronField;
+ }
+
+ private String getCronField(final String cron, final int field) {
+ String cronField = null;
+
+ if (cron != null && !cron.isEmpty() && !"UNSCHEDULE".equals(cron)) {
+ cronField = cron.split(" ")[field].trim();
+ }
+
+ return cronField;
+ }
+
+ public String getCronExpression() {
+ String cronExpression = null;
+
+ if (seconds != null && seconds.getField().getInput() != null
+ && minutes != null && minutes.getField().getInput() != null
+ && hours != null && hours.getField().getInput() != null
+ && daysOfMonth != null && daysOfMonth.getField().getInput() != null
+ && months != null && months.getField().getInput() != null
+ && daysOfWeek != null && daysOfWeek.getField().getInput() != null) {
+
+ cronExpression = new StringBuilder().
+ append(seconds.getField().getInput().trim()).append(" ").
+ append(minutes.getField().getInput().trim()).append(" ").
+ append(hours.getField().getInput().trim()).append(" ").
+ append(daysOfMonth.getField().getInput().trim()).append(" ").
+ append(months.getField().getInput().trim()).append(" ").
+ append(daysOfWeek.getField().getInput().trim()).toString();
+ }
+
+ return cronExpression;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskSearchResultPanel.java
index 794d942..8ba0ba8 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTaskSearchResultPanel.java
@@ -18,7 +18,6 @@
*/
package org.apache.syncope.client.console.tasks;
-import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -26,30 +25,22 @@ import java.util.Date;
import java.util.Iterator;
import java.util.List;
import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.commons.SearchableDataProvider;
-import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.commons.TaskDataProvider;
import org.apache.syncope.client.console.pages.BasePage;
-import org.apache.syncope.client.console.panels.AbstractSearchResultPanel;
import org.apache.syncope.client.console.panels.ModalPanel;
-import org.apache.syncope.client.console.rest.TaskRestClient;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.syncope.common.lib.to.AbstractTaskTO;
import org.apache.syncope.common.lib.to.PropagationTaskTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.lib.types.TaskType;
-import org.apache.syncope.client.console.tasks.PropagationTaskSearchResultPanel.TasksProvider;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
@@ -57,25 +48,16 @@ import org.apache.wicket.model.StringResourceModel;
/**
* Tasks page.
*/
-public abstract class PropagationTaskSearchResultPanel extends AbstractSearchResultPanel<
- PropagationTaskTO, PropagationTaskTO, TasksProvider<PropagationTaskTO>, TaskRestClient>
+public abstract class PropagationTaskSearchResultPanel extends TaskSearchResultPanel<PropagationTaskTO>
implements ModalPanel<PropagationTaskTO> {
private static final long serialVersionUID = 4984337552918213290L;
- private final TaskRestClient taskRestClient = new TaskRestClient();
-
private final String resource;
- protected PropagationTaskSearchResultPanel(
- final String id,
- final PageReference pageRef,
- final String resource) {
-
- super(id, pageRef, false);
+ protected PropagationTaskSearchResultPanel(final String id, final PageReference pageRef, final String resource) {
+ super(id, pageRef);
this.resource = resource;
- setShowResultPage(true);
- modal.size(Modal.Size.Large);
initResultTable();
}
@@ -96,9 +78,6 @@ public abstract class PropagationTaskSearchResultPanel extends AbstractSearchRes
new StringResourceModel("anyKey", this, null), "anyKey", "anyKey"));
columns.add(new PropertyColumn<PropagationTaskTO, String>(
- new StringResourceModel("resource", this, null), "resource", "resource"));
-
- columns.add(new PropertyColumn<PropagationTaskTO, String>(
new StringResourceModel("connObjectKey", this, null), "connObjectKey", "connObjectKey"));
columns.add(new DatePropertyColumn<PropagationTaskTO>(
@@ -203,7 +182,7 @@ public abstract class PropagationTaskSearchResultPanel extends AbstractSearchRes
}
@Override
- protected TasksProvider<PropagationTaskTO> dataProvider() {
+ protected PropagationTasksProvider dataProvider() {
return new PropagationTasksProvider(rows, this.resource);
}
@@ -212,29 +191,14 @@ public abstract class PropagationTaskSearchResultPanel extends AbstractSearchRes
return Constants.PREF_PROPAGATION_TASKS_PAGINATOR_ROWS;
}
- @Override
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public void onError(final AjaxRequestTarget target, final Form<?> form) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public PropagationTaskTO getItem() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- public class PropagationTasksProvider extends TasksProvider<PropagationTaskTO> {
+ public class PropagationTasksProvider extends TaskDataProvider<PropagationTaskTO> {
private static final long serialVersionUID = 4725679400450513556L;
private final String resource;
public PropagationTasksProvider(final int paginatorRows, final String resource) {
- super(paginatorRows, TaskType.PROPAGATION);
+ super(paginatorRows, TaskType.PROPAGATION, taskRestClient);
this.resource = resource;
}
@@ -249,39 +213,4 @@ public abstract class PropagationTaskSearchResultPanel extends AbstractSearchRes
return tasks.iterator();
}
}
-
- public abstract class TasksProvider<T extends AbstractTaskTO> extends SearchableDataProvider<T> {
-
- private static final long serialVersionUID = -20112718133295756L;
-
- private final SortableDataProviderComparator<T> comparator;
-
- private final TaskType id;
-
- public TasksProvider(final int paginatorRows, final TaskType id) {
-
- super(paginatorRows);
-
- //Default sorting
- setSort("key", SortOrder.DESCENDING);
- comparator = new SortableDataProviderComparator<T>(this);
- this.id = id;
- }
-
- public SortableDataProviderComparator<T> getComparator() {
- return comparator;
- }
-
- @Override
- public long size() {
- return taskRestClient.count(id);
- }
-
- @Override
- public IModel<T> model(final T object) {
- return new CompoundPropertyModel<>(object);
- }
- }
-
- protected abstract void viewTask(final PropagationTaskTO taskTO, final AjaxRequestTarget target);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
index d591729..e6f58e0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PropagationTasks.java
@@ -18,18 +18,14 @@
*/
package org.apache.syncope.client.console.tasks;
-import java.io.Serializable;
-import org.apache.syncope.client.console.panels.ModalPanel;
import org.apache.syncope.client.console.panels.MultilevelPanel;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.to.AnyTO;
import org.apache.syncope.common.lib.to.PropagationTaskTO;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.panel.Panel;
-public class PropagationTasks extends Panel implements ModalPanel<Serializable> {
+public class PropagationTasks extends AbstractTasks {
private static final long serialVersionUID = -4013796607157549641L;
@@ -50,19 +46,4 @@ public class PropagationTasks extends Panel implements ModalPanel<Serializable>
}
});
}
-
- @Override
- public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public void onError(final AjaxRequestTarget target, final Form<?> form) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public Serializable getItem() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskSearchResultPanel.java
new file mode 100644
index 0000000..34d7c11
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/ProvisioningTaskSearchResultPanel.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.common.lib.to.AbstractProvisioningTaskTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.model.StringResourceModel;
+
+/**
+ * Tasks page.
+ *
+ * @param <T> Sched task type.
+ */
+public abstract class ProvisioningTaskSearchResultPanel<T extends AbstractProvisioningTaskTO>
+ extends SchedTaskSearchResultPanel<T> {
+
+ private static final long serialVersionUID = 4984337552918213290L;
+
+ private final String resource;
+
+ protected ProvisioningTaskSearchResultPanel(
+ final String id, final Class<T> reference, final String resource, final PageReference pageRef) {
+ super(id, reference, pageRef);
+ this.resource = resource;
+
+ // super in order to call the parent implementation
+ super.initResultTable();
+ }
+
+ @Override
+ protected void initResultTable() {
+ // DO nothing in order to disable the call performed by the parent
+ }
+
+ @Override
+ protected List<IColumn<T, String>> getFieldColumns() {
+ final List<IColumn<T, String>> columns = new ArrayList<IColumn<T, String>>();
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("name", this, null), "name", "name"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("description", this, null), "description", "description"));
+
+ columns.add(new DatePropertyColumn<T>(
+ new StringResourceModel("lastExec", this, null), "lastExec", "lastExec"));
+
+ columns.add(new DatePropertyColumn<T>(
+ new StringResourceModel("nextExec", this, null), "nextExec", "nextExec"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("latestExecStatus", this, null), "latestExecStatus", "latestExecStatus"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("active", this, null), "active", "active"));
+
+ return columns;
+ }
+
+ @Override
+ protected ProvisioningTasksProvider<T> dataProvider() {
+ return new ProvisioningTasksProvider<T>(reference, rows);
+ }
+
+ public class ProvisioningTasksProvider<T extends AbstractProvisioningTaskTO> extends SchedTasksProvider<T> {
+
+ private static final long serialVersionUID = 4725679400450513556L;
+
+ private final Class<T> reference;
+
+ public ProvisioningTasksProvider(final Class<T> reference, final int paginatorRows) {
+ super(reference, paginatorRows);
+ this.reference = reference;
+ }
+
+ @Override
+ public Iterator<T> iterator(final long first, final long count) {
+ final int page = ((int) first / paginatorRows);
+
+ final List<T> tasks = taskRestClient.list(
+ resource, reference, (page < 0 ? 0 : page) + 1, paginatorRows, getSort());
+
+ Collections.sort(tasks, getComparator());
+ return tasks.iterator();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/PushTaskSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/PushTaskSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PushTaskSearchResultPanel.java
new file mode 100644
index 0000000..e993b86
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/PushTaskSearchResultPanel.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.common.lib.to.PushTaskTO;
+import org.apache.wicket.PageReference;
+
+/**
+ * Tasks page.
+ */
+public abstract class PushTaskSearchResultPanel extends ProvisioningTaskSearchResultPanel<PushTaskTO> {
+
+ private static final long serialVersionUID = 4984337552918213290L;
+
+ protected PushTaskSearchResultPanel(final String id, final String resource, final PageReference pageRef) {
+ super(id, PushTaskTO.class, resource, pageRef);
+ }
+
+ @Override
+ protected String paginatorRowsKey() {
+ return Constants.PREF_PUSH_TASKS_PAGINATOR_ROWS;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDetails.java
new file mode 100644
index 0000000..b1f6de4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDetails.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.wicket.PageReference;
+
+/**
+ * Modal window with Task form (to stop and start execution).
+ */
+public class SchedTaskDetails extends AbstractSchedTaskDetails<SchedTaskTO> {
+
+ private static final long serialVersionUID = -2501860242590060867L;
+
+ public SchedTaskDetails(final SchedTaskTO taskTO, final PageReference pageRef) {
+ super(taskTO, pageRef);
+ }
+
+// @Override
+// public void submitAction(final SchedTaskTO taskTO) {
+// if (taskTO.getId() > 0) {
+// taskRestClient.updateSchedTask(taskTO);
+// } else {
+// taskRestClient.createSchedTask(taskTO);
+// }
+// }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskSearchResultPanel.java
new file mode 100644
index 0000000..e2c0c11
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskSearchResultPanel.java
@@ -0,0 +1,270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.commons.TaskDataProvider;
+import org.apache.syncope.client.console.pages.BasePage;
+import org.apache.syncope.client.console.panels.ModalPanel;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink.ActionType;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
+import org.apache.syncope.common.lib.types.TaskType;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.model.StringResourceModel;
+
+/**
+ * Tasks page.
+ *
+ * @param <T> Sched task type.
+ */
+public abstract class SchedTaskSearchResultPanel<T extends SchedTaskTO> extends TaskSearchResultPanel<T>
+ implements ModalPanel<T> {
+
+ private static final long serialVersionUID = 4984337552918213290L;
+
+ protected final Class<T> reference;
+
+ protected SchedTaskSearchResultPanel(final String id, final Class<T> reference, final PageReference pageRef) {
+ super(id, pageRef);
+ this.reference = reference;
+ initResultTable();
+ }
+
+ protected List<IColumn<T, String>> getFieldColumns() {
+ final List<IColumn<T, String>> columns = new ArrayList<IColumn<T, String>>();
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("key", this, null), "key", "key"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("name", this, null), "name", "name"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("description", this, null), "description", "description"));
+
+ columns.add(new PropertyColumn<T, String>(new StringResourceModel(
+ "jobDelegateClassName", this, null), "jobDelegateClassName", "jobDelegateClassName") {
+
+ private static final long serialVersionUID = -3223917055078733093L;
+
+ @Override
+ public void populateItem(
+ final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
+ final IModel<?> model = getDataModel(rowModel);
+ if (model != null && model.getObject() instanceof String) {
+ String value = String.class.cast(model.getObject());
+ if (value.length() > 20) {
+ item.add(new Label(componentId,
+ new Model<String>("..." + value.substring(value.length() - 17))));
+ } else {
+ item.add(new Label(componentId, getDataModel(rowModel)));
+ }
+ } else {
+ super.populateItem(item, componentId, rowModel);
+ }
+ }
+
+ });
+
+ columns.add(new DatePropertyColumn<T>(
+ new StringResourceModel("lastExec", this, null), "lastExec", "lastExec"));
+
+ columns.add(new DatePropertyColumn<T>(
+ new StringResourceModel("nextExec", this, null), "nextExec", "nextExec"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("latestExecStatus", this, null), "latestExecStatus", "latestExecStatus"));
+
+ columns.add(new PropertyColumn<T, String>(
+ new StringResourceModel("active", this, null), "active", "active"));
+
+ return columns;
+ }
+
+ @Override
+ protected final List<IColumn<T, String>> getColumns() {
+ final List<IColumn<T, String>> columns = new ArrayList<IColumn<T, String>>();
+
+ columns.addAll(getFieldColumns());
+
+ columns.add(new ActionColumn<T, String>(new ResourceModel("actions", "")) {
+
+ private static final long serialVersionUID = 2054811145491901166L;
+
+ @Override
+ public String getCssClass() {
+ return "action";
+ }
+
+ @Override
+ public ActionLinksPanel<T> getActions(
+ final String componentId, final IModel<T> model) {
+
+ final T taskTO = model.getObject();
+
+ final ActionLinksPanel<T> panel = ActionLinksPanel.<T>builder(pageRef).
+ add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T modelObject) {
+ viewTask(taskTO, target);
+ }
+ }, ActionLink.ActionType.EDIT, StandardEntitlement.TASK_READ).
+ add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T modelObject) {
+ try {
+ taskRestClient.startExecution(taskTO.getKey(), new Date());
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ LOG.error("While running propagation task {}", taskTO.getKey(), e);
+ }
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE).
+ add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T modelObject) {
+ try {
+ taskRestClient.startExecution(taskTO.getKey(), new Date(), true);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ LOG.error("While running propagation task {}", taskTO.getKey(), e);
+ }
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DRYRUN, StandardEntitlement.TASK_EXECUTE).
+ add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T modelObject) {
+ try {
+ taskRestClient.delete(taskTO.getKey(), reference);
+ info(getString(Constants.OPERATION_SUCCEEDED));
+ target.add(container);
+ } catch (SyncopeClientException e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ LOG.error("While deleting propagation task {}", taskTO.getKey(), e);
+ }
+ ((BasePage) getPage()).getNotificationPanel().refresh(target);
+ }
+ }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE).build(componentId);
+
+ return panel;
+ }
+
+ @Override
+ public ActionLinksPanel<T> getHeader(final String componentId) {
+ final ActionLinksPanel.Builder<T> panel
+ = ActionLinksPanel.builder(page.getPageReference());
+
+ return panel.add(new ActionLink<T>() {
+
+ private static final long serialVersionUID = -7978723352517770644L;
+
+ @Override
+ public void onClick(final AjaxRequestTarget target, final T ignore) {
+ if (target != null) {
+ target.add(container);
+ }
+ }
+ }, ActionLink.ActionType.RELOAD, StandardEntitlement.TASK_LIST).build(componentId);
+ }
+ });
+
+ return columns;
+ }
+
+ @Override
+ protected String paginatorRowsKey() {
+ return Constants.PREF_SCHED_TASKS_PAGINATOR_ROWS;
+ }
+
+ @Override
+ protected Collection<ActionType> getBulkActions() {
+ final List<ActionType> bulkActions = new ArrayList<>();
+ bulkActions.add(ActionType.DELETE);
+ bulkActions.add(ActionType.EXECUTE);
+ bulkActions.add(ActionType.DRYRUN);
+ return bulkActions;
+ }
+
+ @Override
+ protected SchedTasksProvider<T> dataProvider() {
+ return new SchedTasksProvider<T>(reference, rows);
+ }
+
+ public class SchedTasksProvider<T extends SchedTaskTO> extends TaskDataProvider<T> {
+
+ private static final long serialVersionUID = 4725679400450513556L;
+
+ private final Class<T> reference;
+
+ public SchedTasksProvider(final Class<T> reference, final int paginatorRows) {
+ super(paginatorRows, TaskType.SCHEDULED, taskRestClient);
+ this.reference = reference;
+ }
+
+ @Override
+ public Iterator<T> iterator(final long first, final long count) {
+ final int page = ((int) first / paginatorRows);
+
+ final List<T> tasks = taskRestClient.list(
+ reference, (page < 0 ? 0 : page) + 1, paginatorRows, getSort());
+
+ Collections.sort(tasks, getComparator());
+ return tasks.iterator();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTasks.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTasks.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTasks.java
new file mode 100644
index 0000000..727cc64
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTasks.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import org.apache.syncope.client.console.panels.MultilevelPanel;
+import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+
+public class SchedTasks extends AbstractTasks {
+
+ private static final long serialVersionUID = -4013796607157549641L;
+
+ public <T extends AnyTO> SchedTasks(final PageReference pageReference) {
+ super(BaseModal.CONTENT_ID);
+
+ final MultilevelPanel mlp = new MultilevelPanel("tasks");
+ add(mlp);
+
+ mlp.setFirstLevel(new SchedTaskSearchResultPanel<SchedTaskTO>(
+ MultilevelPanel.FIRST_LEVEL_ID, SchedTaskTO.class, pageReference) {
+
+ private static final long serialVersionUID = -2195387360323687302L;
+
+ @Override
+ protected void viewTask(final SchedTaskTO taskTO, final AjaxRequestTarget target) {
+ mlp.next("task.view", new SchedTaskDetails(taskTO, pageReference), target);
+ }
+ });
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/SyncTaskSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SyncTaskSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SyncTaskSearchResultPanel.java
new file mode 100644
index 0000000..2a22f1c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SyncTaskSearchResultPanel.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.common.lib.to.SyncTaskTO;
+import org.apache.wicket.PageReference;
+
+/**
+ * Tasks page.
+ */
+public abstract class SyncTaskSearchResultPanel extends ProvisioningTaskSearchResultPanel<SyncTaskTO> {
+
+ private static final long serialVersionUID = 4984337552918213290L;
+
+ protected SyncTaskSearchResultPanel(final String id, final String resource, final PageReference pageRef) {
+ super(id, SyncTaskTO.class, resource, pageRef);
+ }
+
+ @Override
+ protected String paginatorRowsKey() {
+ return Constants.PREF_SYNC_TASKS_PAGINATOR_ROWS;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskSearchResultPanel.java
new file mode 100644
index 0000000..3d62d54
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskSearchResultPanel.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.tasks;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import org.apache.syncope.client.console.commons.SearchableDataProvider;
+import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
+import org.apache.syncope.client.console.commons.TaskDataProvider;
+import org.apache.syncope.client.console.panels.AbstractSearchResultPanel;
+import org.apache.syncope.client.console.panels.ModalPanel;
+import org.apache.syncope.client.console.rest.TaskRestClient;
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.types.TaskType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+
+/**
+ * Tasks page.
+ *
+ * @param <T> task type.
+ */
+public abstract class TaskSearchResultPanel<T extends AbstractTaskTO>
+ extends AbstractSearchResultPanel<T, T, TaskDataProvider<T>, TaskRestClient> implements ModalPanel<T> {
+
+ private static final long serialVersionUID = 4984337552918213290L;
+
+ protected final TaskRestClient taskRestClient = new TaskRestClient();
+
+ protected TaskSearchResultPanel(final String id, final PageReference pageRef) {
+ super(id, pageRef, false);
+ setShowResultPage(false);
+ modal.size(Modal.Size.Large);
+ }
+
+ @Override
+ public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void onError(final AjaxRequestTarget target, final Form<?> form) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public T getItem() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ public abstract class TasksProvider<T extends AbstractTaskTO> extends SearchableDataProvider<T> {
+
+ private static final long serialVersionUID = -20112718133295756L;
+
+ private final SortableDataProviderComparator<T> comparator;
+
+ private final TaskType id;
+
+ public TasksProvider(final int paginatorRows, final TaskType id) {
+
+ super(paginatorRows);
+
+ //Default sorting
+ setSort("key", SortOrder.DESCENDING);
+ comparator = new SortableDataProviderComparator<T>(this);
+ this.id = id;
+ }
+
+ public SortableDataProviderComparator<T> getComparator() {
+ return comparator;
+ }
+
+ @Override
+ public long size() {
+ return taskRestClient.count(id);
+ }
+
+ @Override
+ public IModel<T> model(final T object) {
+ return new CompoundPropertyModel<>(object);
+ }
+ }
+
+ protected abstract void viewTask(final T taskTO, final AjaxRequestTarget target);
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
index 7c7215e..3eaf1bb 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
@@ -29,6 +29,7 @@ import org.apache.syncope.client.console.panels.TogglePanel;
import org.apache.syncope.client.console.rest.ConnectorRestClient;
import org.apache.syncope.client.console.rest.ResourceRestClient;
import org.apache.syncope.client.console.tasks.PropagationTasks;
+import org.apache.syncope.client.console.tasks.SchedTasks;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.confirmation.ConfirmationModalBehavior;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.ConnInstanceTO;
@@ -116,8 +117,8 @@ public class TopologyTogglePanel extends TogglePanel<Serializable> {
@Override
public void onClick(final AjaxRequestTarget target) {
- target.add(modal);
- modal.header(new ResourceModel("task.generic.list", "Generic tasks"));
+ target.add(modal.setContent(new SchedTasks(pageRef)));
+ modal.header(new ResourceModel("task.generic.list", "Scheduled tasks"));
modal.show(true);
}
};
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/META-INF/resources/css/topology.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/topology.css b/client/console/src/main/resources/META-INF/resources/css/topology.css
index ba2a804..95d9ab3 100644
--- a/client/console/src/main/resources/META-INF/resources/css/topology.css
+++ b/client/console/src/main/resources/META-INF/resources/css/topology.css
@@ -177,3 +177,19 @@ div.node-action-link .dropdown-menu{
margin: 0px;
border-radius: 0.5em;
}
+
+/**
+START - CRONTAB
+*/
+div#schedule input, div#schedule fieldset {
+ width: 50px;
+ float: left
+}
+
+div#templates {
+ padding-top: 30px;
+ clear: both;
+}
+/**
+END -CRONTAB
+*/
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.html b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.html
new file mode 100644
index 0000000..0136a05
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.html
@@ -0,0 +1,30 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <div class="form-group"><span wicket:id="name">[id]</span></div>
+ <div class="form-group"><span wicket:id="description">[anyKey]</span></div>
+ <div class="form-group"><span wicket:id="jobDelegateClassName">[jobDelegateClassName]</span></div>
+ <div class="form-group"><span wicket:id="lastExec">[lastExec]</span></div>
+ <div class="form-group"><span wicket:id="nextExec">[lastExec]</span></div>
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.properties
new file mode 100644
index 0000000..30bb712
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+name=Name
+description=Description
+jobDelegateClassName=Class
+lastExec=Last Execution
+nextExec=Next Execution
+detail=Detail
+delete=Delete
+edit=Edit
+execute=Execute
+executeDryRun=Dry run
+latestExecStatus=Last status
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_it.properties
new file mode 100644
index 0000000..30bb712
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_it.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+name=Name
+description=Description
+jobDelegateClassName=Class
+lastExec=Last Execution
+nextExec=Next Execution
+detail=Detail
+delete=Delete
+edit=Edit
+execute=Execute
+executeDryRun=Dry run
+latestExecStatus=Last status
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_pt_BR.properties
new file mode 100644
index 0000000..30bb712
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Profile_pt_BR.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+name=Name
+description=Description
+jobDelegateClassName=Class
+lastExec=Last Execution
+nextExec=Next Execution
+detail=Detail
+delete=Delete
+edit=Edit
+execute=Execute
+executeDryRun=Dry run
+latestExecStatus=Last status
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Schedule.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Schedule.html b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Schedule.html
new file mode 100644
index 0000000..99e853e
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails$Schedule.html
@@ -0,0 +1,26 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
+ <head><title></title></head>
+ <body>
+ <wicket:panel>
+ <span wicket:id="schedule"/>
+ </wicket:panel>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.properties
new file mode 100644
index 0000000..18ed6c3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+profile=Profile
+schedule=Schedule
+start=Start
+end=End
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_it.properties
new file mode 100644
index 0000000..d174a07
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_it.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+profile=Profilo
+schedule=Pianificazione
+start=Inizio
+end=Fine
http://git-wip-us.apache.org/repos/asf/syncope/blob/a4a9ef56/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_pt_BR.properties
new file mode 100644
index 0000000..18ed6c3
--- /dev/null
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/AbstractSchedTaskDetails_pt_BR.properties
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+profile=Profile
+schedule=Schedule
+start=Start
+end=End