You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2014/10/30 16:46:20 UTC
[1/3] git commit: [SYNCOPE-576] Managing general conf parameters in a
modal window to simplify the process
Repository: syncope
Updated Branches:
refs/heads/1_2_X 5248dc7ff -> 8fc6e9e54
refs/heads/master 8614d33fd -> 7530ea211
[SYNCOPE-576] Managing general conf parameters in a modal window to simplify the process
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8fc6e9e5
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8fc6e9e5
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8fc6e9e5
Branch: refs/heads/1_2_X
Commit: 8fc6e9e542266dbdcf04d8db5bcbbe6ea7d9385e
Parents: 5248dc7
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Oct 30 16:45:55 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Oct 30 16:45:55 2014 +0100
----------------------------------------------------------------------
.../syncope/console/pages/AbstractBasePage.java | 6 +-
.../syncope/console/pages/ConfModalPage.java | 111 +++++++++++++++++++
.../syncope/console/pages/Configuration.java | 106 +++++++-----------
.../console/pages/NotificationModalPage.java | 4 -
.../syncope/console/pages/RoleModalPage.java | 21 ++--
.../console/pages/panels/RoleSummaryPanel.java | 8 +-
.../console/pages/panels/RoleTabPanel.java | 6 +-
.../console/rest/ConfigurationRestClient.java | 14 ++-
.../syncope/console/pages/ConfModalPage.html | 39 +++++++
.../console/pages/ConfModalPage.properties | 17 +++
.../console/pages/ConfModalPage_it.properties | 17 +++
.../pages/ConfModalPage_pt_BR.properties | 17 +++
.../syncope/console/pages/Configuration.html | 25 ++---
.../syncope/console/pages/RoleModalPage.html | 2 +-
console/src/main/webapp/img/db_export.png | Bin 1105 -> 16675 bytes
.../console/ConfigurationTestITCase.java | 78 +++++++------
16 files changed, 330 insertions(+), 141 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java b/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
index cacfbbc..d57b1b0 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
@@ -22,6 +22,7 @@ import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.commons.XMLRolesReader;
import org.apache.syncope.console.init.MIMETypesInitializer;
import org.apache.syncope.console.pages.panels.NotificationPanel;
+import org.apache.syncope.console.rest.ConfigurationRestClient;
import org.apache.syncope.console.rest.ReportRestClient;
import org.apache.syncope.console.rest.ResourceRestClient;
import org.apache.syncope.console.rest.RoleRestClient;
@@ -85,7 +86,10 @@ public class AbstractBasePage extends WebPage {
@SpringBean
protected ReportRestClient reportRestClient;
-
+
+ @SpringBean
+ protected ConfigurationRestClient confRestClient;
+
@SpringBean
protected MIMETypesInitializer mimeTypesInitializer;
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java
new file mode 100644
index 0000000..fe72f87
--- /dev/null
+++ b/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java
@@ -0,0 +1,111 @@
+/*
+ * 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.console.pages;
+
+import java.util.Collections;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.to.AttributeTO;
+import org.apache.syncope.common.to.ConfTO;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.Mode;
+import org.apache.syncope.console.pages.panels.AttributesPanel;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class ConfModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 3524777398688399977L;
+
+ public ConfModalPage(final PageReference pageRef, final ModalWindow window, final WebMarkupContainer parameters) {
+ super();
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ parameters, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration", "list"));
+ final ConfTO conf = confRestClient.list();
+
+ final Form<ConfTO> form = new Form<ConfTO>("confForm");
+ form.setModel(new CompoundPropertyModel<ConfTO>(conf));
+
+ form.add(new AttributesPanel("paramAttrs", conf, form, Mode.ADMIN));
+
+ final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ConfTO updatedConf = (ConfTO) form.getModelObject();
+
+ try {
+ for (AttributeTO attr : updatedConf.getAttrs()) {
+ if (attr.getValues().isEmpty()
+ || attr.getValues().equals(Collections.singletonList(StringUtils.EMPTY))) {
+
+ confRestClient.delete(attr.getSchema());
+ } else {
+ confRestClient.set(attr);
+ }
+ }
+
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ window.close(target);
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration", "set"));
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration", "delete"));
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ 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);
+ form.add(cancel);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/Configuration.java b/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
index fffe657..4851117 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
@@ -25,7 +25,6 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.LoggerConfig;
@@ -41,13 +40,10 @@ import org.apache.syncope.common.types.LoggerLevel;
import org.apache.syncope.common.types.PolicyType;
import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.commons.HttpResourceStream;
-import org.apache.syncope.console.commons.Mode;
import org.apache.syncope.console.commons.PreferenceManager;
import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.console.pages.panels.AttributesPanel;
import org.apache.syncope.console.pages.panels.LayoutsPanel;
import org.apache.syncope.console.pages.panels.PoliciesPanel;
-import org.apache.syncope.console.rest.ConfigurationRestClient;
import org.apache.syncope.console.rest.LoggerRestClient;
import org.apache.syncope.console.rest.NotificationRestClient;
import org.apache.syncope.console.rest.SecurityQuestionRestClient;
@@ -81,7 +77,6 @@ import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.PropertyListView;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.AbstractReadOnlyModel;
-import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
@@ -101,6 +96,10 @@ public class Configuration extends BasePage {
private static final long serialVersionUID = -2838270869037702214L;
+ private static final int SYNCOPECONF_WIN_HEIGHT = 300;
+
+ private static final int SYNCOPECONF_WIN_WIDTH = 900;
+
private static final int NOTIFICATION_WIN_HEIGHT = 500;
private static final int NOTIFICATION_WIN_WIDTH = 1100;
@@ -110,9 +109,6 @@ public class Configuration extends BasePage {
private static final int SECURITY_QUESTION_WIN_WIDTH = 900;
@SpringBean
- private ConfigurationRestClient confRestClient;
-
- @SpringBean
private LoggerRestClient loggerRestClient;
@SpringBean
@@ -127,6 +123,8 @@ public class Configuration extends BasePage {
@SpringBean
private PreferenceManager prefMan;
+ private final ModalWindow syncopeConfWin;
+
private final ModalWindow createNotificationWin;
private final ModalWindow editNotificationWin;
@@ -144,6 +142,11 @@ public class Configuration extends BasePage {
public Configuration() {
super();
+ add(syncopeConfWin = new ModalWindow("syncopeConfWin"));
+ syncopeConfWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ syncopeConfWin.setInitialHeight(SYNCOPECONF_WIN_HEIGHT);
+ syncopeConfWin.setInitialWidth(SYNCOPECONF_WIN_WIDTH);
+ syncopeConfWin.setCookieName("syncopeconf-modal");
setupSyncopeConf();
add(new PoliciesPanel("passwordPoliciesPanel", getPageReference(), PolicyType.PASSWORD));
@@ -151,11 +154,27 @@ public class Configuration extends BasePage {
add(new PoliciesPanel("syncPoliciesPanel", getPageReference(), PolicyType.SYNC));
add(createNotificationWin = new ModalWindow("createNotificationWin"));
+ createNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
+ createNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
+ createNotificationWin.setCookieName("create-notification-modal");
add(editNotificationWin = new ModalWindow("editNotificationWin"));
+ editNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
+ editNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
+ editNotificationWin.setCookieName("edit-notification-modal");
setupNotification();
add(createSecurityQuestionWin = new ModalWindow("createSecurityQuestionWin"));
+ createSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+ createSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+ createSecurityQuestionWin.setCookieName("create-security-question-modal");
add(editSecurityQuestionWin = new ModalWindow("editSecurityQuestionWin"));
+ editSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+ editSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+ editSecurityQuestionWin.setCookieName("edit-security-question-modal");
setupSecurityQuestion();
// Workflow definition stuff
@@ -255,59 +274,32 @@ public class Configuration extends BasePage {
@SuppressWarnings({ "unchecked", "rawtypes" })
private void setupSyncopeConf() {
- WebMarkupContainer parameters = new WebMarkupContainer("parameters");
+ final WebMarkupContainer parameters = new WebMarkupContainer("parameters");
+ parameters.setOutputMarkupId(true);
add(parameters);
- MetaDataRoleAuthorizationStrategy.authorize(parameters, ENABLE, xmlRolesReader.getAllAllowedRoles(
- "Configuration", "list"));
- final ConfTO conf = confRestClient.list();
+ setWindowClosedCallback(syncopeConfWin, parameters);
- for (Iterator<AttributeTO> it = conf.getAttrs().iterator(); it.hasNext();) {
- AttributeTO attr = it.next();
- for (AttrLayoutType type : AttrLayoutType.values()) {
- if (type.getConfKey().equals(attr.getSchema())) {
- it.remove();
- }
- }
- }
-
- final Form<?> form = new Form<Void>("confForm");
- form.setModel(new CompoundPropertyModel(conf));
- parameters.add(form);
-
- form.add(new AttributesPanel("parameters", conf, form, Mode.ADMIN));
-
- IndicatingAjaxLink<Void> save = new IndicatingAjaxLink<Void>("saveParameters") {
+ AjaxLink<Void> confLink = new IndicatingAjaxLink<Void>("confLink") {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target) {
- final ConfTO updatedConf = (ConfTO) form.getModelObject();
+ syncopeConfWin.setPageCreator(new ModalWindow.PageCreator() {
- try {
- for (AttributeTO attr : updatedConf.getAttrs()) {
- if (attr.getValues().isEmpty()
- || attr.getValues().equals(Collections.singletonList(StringUtils.EMPTY))) {
+ private static final long serialVersionUID = -7834632442532690940L;
- confRestClient.delete(attr.getSchema());
- } else {
- confRestClient.set(attr);
- }
+ @Override
+ public Page createPage() {
+ return new ConfModalPage(getPageReference(), editNotificationWin, parameters);
}
+ });
- info(getString(Constants.OPERATION_SUCCEEDED));
- feedbackPanel.refresh(target);
- } catch (Exception e) {
- LOG.error("While updating configuration parameters", e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
- }
+ syncopeConfWin.show(target);
}
};
- MetaDataRoleAuthorizationStrategy.authorize(save, ENABLE, xmlRolesReader.getAllAllowedRoles(
- "Configuration", "set"));
- form.add(save);
+ parameters.add(confLink);
Link<Void> dbExportLink = new Link<Void>("dbExportLink") {
@@ -422,16 +414,6 @@ public class Configuration extends BasePage {
add(notificationContainer);
- createNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- createNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
- createNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
- createNotificationWin.setCookieName("create-notification-modal");
-
- editNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- editNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
- editNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
- editNotificationWin.setCookieName("edit-notification-modal");
-
setWindowClosedCallback(createNotificationWin, notificationContainer);
setWindowClosedCallback(editNotificationWin, notificationContainer);
@@ -565,16 +547,6 @@ public class Configuration extends BasePage {
add(securityQuestionContainer);
- createSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- createSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
- createSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
- createSecurityQuestionWin.setCookieName("create-security-question-modal");
-
- editSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- editSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
- editSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
- editSecurityQuestionWin.setCookieName("edit-security-question-modal");
-
setWindowClosedCallback(createSecurityQuestionWin, securityQuestionContainer);
setWindowClosedCallback(editSecurityQuestionWin, securityQuestionContainer);
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
index 715cd10..63405af 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
@@ -32,7 +32,6 @@ import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.pages.panels.LoggerCategoryPanel;
import org.apache.syncope.console.pages.panels.RoleSearchPanel;
import org.apache.syncope.console.pages.panels.UserSearchPanel;
-import org.apache.syncope.console.rest.ConfigurationRestClient;
import org.apache.syncope.console.rest.LoggerRestClient;
import org.apache.syncope.console.rest.NotificationRestClient;
import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
@@ -63,9 +62,6 @@ class NotificationModalPage extends BaseModalPage {
private NotificationRestClient restClient;
@SpringBean
- private ConfigurationRestClient confRestClient;
-
- @SpringBean
private LoggerRestClient loggerRestClient;
public NotificationModalPage(final PageReference pageRef, final ModalWindow window,
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
index ffd7ff4..095399b 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
@@ -74,7 +74,7 @@ public class RoleModalPage extends BaseModalPage {
originalRoleTO = SerializationUtils.clone(roleTO);
}
- final Form<RoleTO> form = new Form<RoleTO>("RoleForm");
+ final Form<RoleTO> form = new Form<RoleTO>("roleForm");
form.setMultiPart(true);
add(new Label("displayName", roleTO.getId() == 0 ? "" : roleTO.getDisplayName()));
@@ -110,6 +110,8 @@ public class RoleModalPage extends BaseModalPage {
feedbackPanel.refresh(target);
}
};
+ form.add(submit);
+ form.setDefaultButton(submit);
final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
@@ -120,29 +122,24 @@ public class RoleModalPage extends BaseModalPage {
closeAction(target, form);
}
};
-
cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Roles",
createFlag
- ? "create"
- : "update"));
-
- form.add(submit);
- form.setDefaultButton(submit);
-
- form.add(cancel);
+ ? "create"
+ : "update"));
add(form);
}
- protected void submitAction(final AjaxRequestTarget target, final Form form) {
+ protected void submitAction(final AjaxRequestTarget target, final Form<?> form) {
final RoleTO roleTO = (RoleTO) form.getDefaultModelObject();
final List<String> entitlementList = new ArrayList<String>(rolePanel.getSelectedEntitlements());
roleTO.getEntitlements().clear();
roleTO.getEntitlements().addAll(entitlementList);
- final RoleTO result;
+ RoleTO result;
if (createFlag) {
result = roleRestClient.create(roleTO);
} else {
@@ -159,7 +156,7 @@ public class RoleModalPage extends BaseModalPage {
setResponsePage(new ResultStatusModalPage.Builder(window, result).build());
}
- protected void closeAction(final AjaxRequestTarget target, final Form form) {
+ protected void closeAction(final AjaxRequestTarget target, final Form<?> form) {
window.close(target);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
index e0f9d3a..072b421 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
@@ -107,8 +107,8 @@ public class RoleSummaryPanel extends Panel {
Fragment fragment = new Fragment("roleSummaryPanel",
builder.selectedNodeId == null
- ? "fakerootFrag"
- : (builder.selectedNodeId == 0 ? "rootPanel" : "roleViewPanel"),
+ ? "fakerootFrag"
+ : (builder.selectedNodeId == 0 ? "rootPanel" : "roleViewPanel"),
this);
if (builder.selectedNodeId != null) {
@@ -130,9 +130,7 @@ public class RoleSummaryPanel extends Panel {
@Override
public Page createPage() {
- RoleTO roleTO = new RoleTO();
- RoleModalPage form = new RoleModalPage(builder.callerPageRef, builder.window, roleTO);
- return form;
+ return new RoleModalPage(builder.callerPageRef, builder.window, new RoleTO());
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
index 04668ab..0cce34a 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
@@ -84,8 +84,7 @@ public class RoleTabPanel extends Panel {
public Page createPage() {
RoleTO roleTO = new RoleTO();
roleTO.setParent(selectedNode.getId());
- RoleModalPage form = new RoleModalPage(pageRef, window, roleTO);
- return form;
+ return new RoleModalPage(pageRef, window, roleTO);
}
});
@@ -124,8 +123,7 @@ public class RoleTabPanel extends Panel {
@Override
public Page createPage() {
RoleTO roleTO = roleRestClient.read(selectedNode.getId());
- RoleModalPage form = new RoleModalPage(pageRef, window, roleTO);
- return form;
+ return new RoleModalPage(pageRef, window, roleTO);
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java b/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
index c650812..d1e4b78 100644
--- a/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
+++ b/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
@@ -19,6 +19,7 @@
package org.apache.syncope.console.rest;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import javax.ws.rs.core.Response;
import org.apache.syncope.common.SyncopeClientException;
@@ -40,7 +41,18 @@ public class ConfigurationRestClient extends BaseRestClient {
private SchemaRestClient schemaRestClient;
public ConfTO list() {
- return getService(ConfigurationService.class).list();
+ ConfTO conf = getService(ConfigurationService.class).list();
+
+ for (Iterator<AttributeTO> it = conf.getAttrs().iterator(); it.hasNext();) {
+ AttributeTO attr = it.next();
+ for (AttrLayoutType type : AttrLayoutType.values()) {
+ if (type.getConfKey().equals(attr.getSchema())) {
+ it.remove();
+ }
+ }
+ }
+
+ return conf;
}
public AttributeTO read(final String key) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html
new file mode 100644
index 0000000..4ce5575
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html
@@ -0,0 +1,39 @@
+<!--
+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">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/>
+ </p>
+ <form wicket:id="confForm">
+ <span wicket:id="paramAttrs"/>
+
+ <div style="bottom:0;margin:10px">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="submit"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties
new file mode 100644
index 0000000..363bef4
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties
@@ -0,0 +1,17 @@
+# 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.
+title=Parameters
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties
new file mode 100644
index 0000000..0fd85ae
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties
@@ -0,0 +1,17 @@
+# 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.
+title=Parametri
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties
new file mode 100644
index 0000000..e7f3992
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties
@@ -0,0 +1,17 @@
+# 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.
+title=Par\u00e2metros
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html b/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
index 78cd215..f3699b8 100644
--- a/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
+++ b/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
@@ -32,9 +32,8 @@ under the License.
<div id="tabs">
<ul>
<li class="tabs-selected">
- <a href="#parameters"><span><wicket:message key="parameters"/></span></a>
+ <a href="#layouts"><span><wicket:message key="layouts"/></span></a>
</li>
- <li><a href="#layouts"><span><wicket:message key="layouts"/></span></a></li>
<li><a href="#policies"><span><wicket:message key="policies"/></span></a></li>
<li><a href="#notifications"><span><wicket:message key="notifications"/></span></a></li>
<li><a href="#securityQuestions"><span><wicket:message key="securityQuestions"/></span></a></li>
@@ -70,17 +69,7 @@ under the License.
<div id="selfMembership" style="border-width: 1px;border-top-width: 0px;">
<span wicket:id="selfMembershipLayoutPanel">[self membership layout panel]</span>
</div>
- </div>
- <div id="parameters" wicket:id="parameters" style="width: 700px;">
- <form wicket:id="confForm">
- <span wicket:id="parameters">[parameters]</span>
-
- <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="saveParameters">
- <wicket:message key="apply"/>
- </a>
- </form>
- </div>
+ </div>
<div id="policies">
<ul>
<li class="tabs-selected">
@@ -220,8 +209,16 @@ under the License.
</div>
</div>
<div>
+ <div wicket:id="parameters">
+ <a style="position: absolute; top: 2px; right:50px;" wicket:id="confLink">
+ <img src="img/actions/settings-icon.png" width="30" height="30"
+ alt="Parameters" title="title" wicket:message="title:parameters"/>
+ </a>
+ </div>
+ <div wicket:id="syncopeConfWin">[Show modal window for conf parameters]</div>
+
<a style="position: absolute; top: 2px; right:20px;" wicket:id="dbExportLink">
- <img src="img/db_export.png"width="30" height="30"
+ <img src="img/db_export.png" width="30" height="30"
alt="DB export" title="title" wicket:message="title:db_export"/>
</a>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html b/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
index 8e00c10..3f54815 100644
--- a/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
+++ b/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
@@ -22,7 +22,7 @@ under the License.
<p class="ui-widget ui-corner-all ui-widget-header">
<wicket:message key="title"/> <span wicket:id="displayName"/>
</p>
- <form wicket:id="RoleForm">
+ <form wicket:id="roleForm">
<div id="tabs">
<div style="display: block; clear: both">
<ul>
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/webapp/img/db_export.png
----------------------------------------------------------------------
diff --git a/console/src/main/webapp/img/db_export.png b/console/src/main/webapp/img/db_export.png
index 540f666..413cb06 100644
Binary files a/console/src/main/webapp/img/db_export.png and b/console/src/main/webapp/img/db_export.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
----------------------------------------------------------------------
diff --git a/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java b/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
index 1ec720d..8647efe 100644
--- a/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
+++ b/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
@@ -31,14 +31,23 @@ public class ConfigurationTestITCase extends AbstractTest {
seleniumDriver.findElement(By.xpath("//img[@alt=\"Configuration\"]")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//img[@title='Parameters']")));
- seleniumDriver.findElement(By.xpath("//span[contains(text(), 'log.lastlogindate')]/../../div[2]/span/input")).
- click();
- seleniumDriver.findElement(By.xpath("//div[@id='parameters']/form/a")).click();
+ seleniumDriver.findElement(By.xpath("//img[@title='Parameters']/ancestor::a")).click();
+
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
+ seleniumDriver.switchTo().frame(0);
+
+ seleniumDriver.findElement(
+ By.xpath("//span[contains(text(), 'log.lastlogindate')]/../../div[2]/span/input")).click();
+ seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/input[@type='submit']")).click();
+
+ seleniumDriver.switchTo().defaultContent();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("feedback")));
- assertTrue(seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
+ assertTrue(
+ seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
}
@Test
@@ -47,13 +56,13 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[2]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='policies']/ul/li[2]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='password']/span/div/a")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
- wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='id:textField']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='id:textField']")));
WebElement element = seleniumDriver.findElement(By.name("description:textField"));
element.sendKeys("new description");
@@ -63,7 +72,8 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("feedback")));
- assertTrue(seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
+ assertTrue(
+ seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
}
@Test
@@ -83,7 +93,7 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[7]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[6]/a")).click();
final Select select = new Select(
seleniumDriver.findElement(By.xpath("//div[@id='core']/div/span/table/tbody/tr/td[2]/select")));
@@ -91,7 +101,8 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='workflow']/div/span/img")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("feedback")));
- assertTrue(seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
+ assertTrue(
+ seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
}
@Test
@@ -100,16 +111,16 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[4]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='notifications']/a")).click();
-
+
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[2]/form/div[3]/div/div/div/div/label")));
- wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
seleniumDriver.findElement(By.name("sender:textField")).sendKeys("test@syncope.it");
@@ -172,8 +183,9 @@ public class ConfigurationTestITCase extends AbstractTest {
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/div[4]/div/div/span/input")).click();
- wait.until(ExpectedConditions.elementToBeClickable(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")));
-
+ wait.until(ExpectedConditions.elementToBeClickable(By.name(
+ "staticRecipients:multiValueContainer:view:0:panel:textField")));
+
seleniumDriver.findElement(By.name(
"staticRecipients:multiValueContainer:view:0:panel:textField")).
sendKeys("syncope445@syncope.apache.org");
@@ -192,13 +204,13 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[4]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='notifications']/a")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
-
+
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[2]/form/div[3]/div/div/div/div/label")));
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
@@ -254,7 +266,8 @@ public class ConfigurationTestITCase extends AbstractTest {
+ "/option[text()='resource-db-sync']")));
select = new Select(
- seleniumDriver.findElement(By.xpath("//select[@name='eventSelection:categoryContainer:subcategory:dropDownChoiceField']")));
+ seleniumDriver.findElement(By.xpath(
+ "//select[@name='eventSelection:categoryContainer:subcategory:dropDownChoiceField']")));
select.selectByVisibleText("resource-db-sync");
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(
@@ -266,15 +279,16 @@ public class ConfigurationTestITCase extends AbstractTest {
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/ul/li[4]/a/span")).click();
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/div[4]/div/div/span/input")).click();
-
- wait.until(ExpectedConditions.elementToBeClickable(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")));
-
+
+ wait.until(ExpectedConditions.elementToBeClickable(By.name(
+ "staticRecipients:multiValueContainer:view:0:panel:textField")));
+
seleniumDriver.findElement(
By.name("staticRecipients:multiValueContainer:view:0:panel:textField"))
.sendKeys("syncope492@syncope.apache.org");
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(
- "//div[2]/form/div[3]/div[4]/div/div[2]/label")));
+ "//div[2]/form/div[3]/div[4]/div/div[2]/label")));
seleniumDriver.findElement(By.xpath("//div[2]/form/div[4]/input")).click();
@@ -287,16 +301,16 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[4]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='notifications']/a")).click();
-
+
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[2]/form/div[3]/div/div/div/div/label")));
- wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
seleniumDriver.findElement(By.name("sender:textField")).sendKeys("syncope446@syncope.it");
seleniumDriver.findElement(By.name("subject:textField")).sendKeys("Test issue Syncope 446");
@@ -352,7 +366,7 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(
By.xpath("//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:type']"
+ "/option[text()='ENTITLEMENT']")));
-
+
wait.until(ExpectedConditions.elementToBeClickable(
By.xpath("//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:type']")));
@@ -365,19 +379,19 @@ public class ConfigurationTestITCase extends AbstractTest {
"//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:property']"
+ "/option[text()='ROLE_CREATE']")));
- select = new Select(
- seleniumDriver.findElement(By.xpath(
- "//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:property']")));
+ select = new Select(seleniumDriver.findElement(By.xpath(
+ "//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:property']")));
select.selectByVisibleText("ROLE_CREATE");
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/ul/li[4]/a/span")).click();
seleniumDriver.findElement(By.xpath("//input[@name='recipientsContainer:checkRecipients:checkboxField']")).
click();
- wait.until(ExpectedConditions.elementToBeClickable(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")));
-
- seleniumDriver.findElement(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")).sendKeys(
- "syncope446@syncope.apache.org");
+ wait.until(ExpectedConditions.elementToBeClickable(By.name(
+ "staticRecipients:multiValueContainer:view:0:panel:textField")));
+
+ seleniumDriver.findElement(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")).
+ sendKeys("syncope446@syncope.apache.org");
seleniumDriver.findElement(By.xpath("//div[2]/form/div[4]/input")).click();
[2/3] git commit: [SYNCOPE-576] Managing general conf parameters in a
modal window to simplify the process
Posted by il...@apache.org.
[SYNCOPE-576] Managing general conf parameters in a modal window to simplify the process
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8fc6e9e5
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8fc6e9e5
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8fc6e9e5
Branch: refs/heads/master
Commit: 8fc6e9e542266dbdcf04d8db5bcbbe6ea7d9385e
Parents: 5248dc7
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Oct 30 16:45:55 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Oct 30 16:45:55 2014 +0100
----------------------------------------------------------------------
.../syncope/console/pages/AbstractBasePage.java | 6 +-
.../syncope/console/pages/ConfModalPage.java | 111 +++++++++++++++++++
.../syncope/console/pages/Configuration.java | 106 +++++++-----------
.../console/pages/NotificationModalPage.java | 4 -
.../syncope/console/pages/RoleModalPage.java | 21 ++--
.../console/pages/panels/RoleSummaryPanel.java | 8 +-
.../console/pages/panels/RoleTabPanel.java | 6 +-
.../console/rest/ConfigurationRestClient.java | 14 ++-
.../syncope/console/pages/ConfModalPage.html | 39 +++++++
.../console/pages/ConfModalPage.properties | 17 +++
.../console/pages/ConfModalPage_it.properties | 17 +++
.../pages/ConfModalPage_pt_BR.properties | 17 +++
.../syncope/console/pages/Configuration.html | 25 ++---
.../syncope/console/pages/RoleModalPage.html | 2 +-
console/src/main/webapp/img/db_export.png | Bin 1105 -> 16675 bytes
.../console/ConfigurationTestITCase.java | 78 +++++++------
16 files changed, 330 insertions(+), 141 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java b/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
index cacfbbc..d57b1b0 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
@@ -22,6 +22,7 @@ import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.commons.XMLRolesReader;
import org.apache.syncope.console.init.MIMETypesInitializer;
import org.apache.syncope.console.pages.panels.NotificationPanel;
+import org.apache.syncope.console.rest.ConfigurationRestClient;
import org.apache.syncope.console.rest.ReportRestClient;
import org.apache.syncope.console.rest.ResourceRestClient;
import org.apache.syncope.console.rest.RoleRestClient;
@@ -85,7 +86,10 @@ public class AbstractBasePage extends WebPage {
@SpringBean
protected ReportRestClient reportRestClient;
-
+
+ @SpringBean
+ protected ConfigurationRestClient confRestClient;
+
@SpringBean
protected MIMETypesInitializer mimeTypesInitializer;
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java
new file mode 100644
index 0000000..fe72f87
--- /dev/null
+++ b/console/src/main/java/org/apache/syncope/console/pages/ConfModalPage.java
@@ -0,0 +1,111 @@
+/*
+ * 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.console.pages;
+
+import java.util.Collections;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.to.AttributeTO;
+import org.apache.syncope.common.to.ConfTO;
+import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.commons.Mode;
+import org.apache.syncope.console.pages.panels.AttributesPanel;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
+import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.ResourceModel;
+
+public class ConfModalPage extends BaseModalPage {
+
+ private static final long serialVersionUID = 3524777398688399977L;
+
+ public ConfModalPage(final PageReference pageRef, final ModalWindow window, final WebMarkupContainer parameters) {
+ super();
+
+ MetaDataRoleAuthorizationStrategy.authorize(
+ parameters, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration", "list"));
+ final ConfTO conf = confRestClient.list();
+
+ final Form<ConfTO> form = new Form<ConfTO>("confForm");
+ form.setModel(new CompoundPropertyModel<ConfTO>(conf));
+
+ form.add(new AttributesPanel("paramAttrs", conf, form, Mode.ADMIN));
+
+ final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
+
+ private static final long serialVersionUID = -958724007591692537L;
+
+ @Override
+ protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+ final ConfTO updatedConf = (ConfTO) form.getModelObject();
+
+ try {
+ for (AttributeTO attr : updatedConf.getAttrs()) {
+ if (attr.getValues().isEmpty()
+ || attr.getValues().equals(Collections.singletonList(StringUtils.EMPTY))) {
+
+ confRestClient.delete(attr.getSchema());
+ } else {
+ confRestClient.set(attr);
+ }
+ }
+
+ if (pageRef.getPage() instanceof BasePage) {
+ ((BasePage) pageRef.getPage()).setModalResult(true);
+ }
+
+ window.close(target);
+ } catch (Exception e) {
+ error(getString(Constants.ERROR) + ": " + e.getMessage());
+ feedbackPanel.refresh(target);
+ }
+ }
+
+ @Override
+ protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+ feedbackPanel.refresh(target);
+ }
+ };
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration", "set"));
+ MetaDataRoleAuthorizationStrategy.authorize(
+ submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration", "delete"));
+ form.add(submit);
+ form.setDefaultButton(submit);
+
+ 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);
+ form.add(cancel);
+
+ add(form);
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/Configuration.java b/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
index fffe657..4851117 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
@@ -25,7 +25,6 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.LoggerConfig;
@@ -41,13 +40,10 @@ import org.apache.syncope.common.types.LoggerLevel;
import org.apache.syncope.common.types.PolicyType;
import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.commons.HttpResourceStream;
-import org.apache.syncope.console.commons.Mode;
import org.apache.syncope.console.commons.PreferenceManager;
import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.console.pages.panels.AttributesPanel;
import org.apache.syncope.console.pages.panels.LayoutsPanel;
import org.apache.syncope.console.pages.panels.PoliciesPanel;
-import org.apache.syncope.console.rest.ConfigurationRestClient;
import org.apache.syncope.console.rest.LoggerRestClient;
import org.apache.syncope.console.rest.NotificationRestClient;
import org.apache.syncope.console.rest.SecurityQuestionRestClient;
@@ -81,7 +77,6 @@ import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.PropertyListView;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.AbstractReadOnlyModel;
-import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
@@ -101,6 +96,10 @@ public class Configuration extends BasePage {
private static final long serialVersionUID = -2838270869037702214L;
+ private static final int SYNCOPECONF_WIN_HEIGHT = 300;
+
+ private static final int SYNCOPECONF_WIN_WIDTH = 900;
+
private static final int NOTIFICATION_WIN_HEIGHT = 500;
private static final int NOTIFICATION_WIN_WIDTH = 1100;
@@ -110,9 +109,6 @@ public class Configuration extends BasePage {
private static final int SECURITY_QUESTION_WIN_WIDTH = 900;
@SpringBean
- private ConfigurationRestClient confRestClient;
-
- @SpringBean
private LoggerRestClient loggerRestClient;
@SpringBean
@@ -127,6 +123,8 @@ public class Configuration extends BasePage {
@SpringBean
private PreferenceManager prefMan;
+ private final ModalWindow syncopeConfWin;
+
private final ModalWindow createNotificationWin;
private final ModalWindow editNotificationWin;
@@ -144,6 +142,11 @@ public class Configuration extends BasePage {
public Configuration() {
super();
+ add(syncopeConfWin = new ModalWindow("syncopeConfWin"));
+ syncopeConfWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ syncopeConfWin.setInitialHeight(SYNCOPECONF_WIN_HEIGHT);
+ syncopeConfWin.setInitialWidth(SYNCOPECONF_WIN_WIDTH);
+ syncopeConfWin.setCookieName("syncopeconf-modal");
setupSyncopeConf();
add(new PoliciesPanel("passwordPoliciesPanel", getPageReference(), PolicyType.PASSWORD));
@@ -151,11 +154,27 @@ public class Configuration extends BasePage {
add(new PoliciesPanel("syncPoliciesPanel", getPageReference(), PolicyType.SYNC));
add(createNotificationWin = new ModalWindow("createNotificationWin"));
+ createNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
+ createNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
+ createNotificationWin.setCookieName("create-notification-modal");
add(editNotificationWin = new ModalWindow("editNotificationWin"));
+ editNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
+ editNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
+ editNotificationWin.setCookieName("edit-notification-modal");
setupNotification();
add(createSecurityQuestionWin = new ModalWindow("createSecurityQuestionWin"));
+ createSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ createSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+ createSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+ createSecurityQuestionWin.setCookieName("create-security-question-modal");
add(editSecurityQuestionWin = new ModalWindow("editSecurityQuestionWin"));
+ editSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
+ editSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
+ editSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
+ editSecurityQuestionWin.setCookieName("edit-security-question-modal");
setupSecurityQuestion();
// Workflow definition stuff
@@ -255,59 +274,32 @@ public class Configuration extends BasePage {
@SuppressWarnings({ "unchecked", "rawtypes" })
private void setupSyncopeConf() {
- WebMarkupContainer parameters = new WebMarkupContainer("parameters");
+ final WebMarkupContainer parameters = new WebMarkupContainer("parameters");
+ parameters.setOutputMarkupId(true);
add(parameters);
- MetaDataRoleAuthorizationStrategy.authorize(parameters, ENABLE, xmlRolesReader.getAllAllowedRoles(
- "Configuration", "list"));
- final ConfTO conf = confRestClient.list();
+ setWindowClosedCallback(syncopeConfWin, parameters);
- for (Iterator<AttributeTO> it = conf.getAttrs().iterator(); it.hasNext();) {
- AttributeTO attr = it.next();
- for (AttrLayoutType type : AttrLayoutType.values()) {
- if (type.getConfKey().equals(attr.getSchema())) {
- it.remove();
- }
- }
- }
-
- final Form<?> form = new Form<Void>("confForm");
- form.setModel(new CompoundPropertyModel(conf));
- parameters.add(form);
-
- form.add(new AttributesPanel("parameters", conf, form, Mode.ADMIN));
-
- IndicatingAjaxLink<Void> save = new IndicatingAjaxLink<Void>("saveParameters") {
+ AjaxLink<Void> confLink = new IndicatingAjaxLink<Void>("confLink") {
private static final long serialVersionUID = -7978723352517770644L;
@Override
public void onClick(final AjaxRequestTarget target) {
- final ConfTO updatedConf = (ConfTO) form.getModelObject();
+ syncopeConfWin.setPageCreator(new ModalWindow.PageCreator() {
- try {
- for (AttributeTO attr : updatedConf.getAttrs()) {
- if (attr.getValues().isEmpty()
- || attr.getValues().equals(Collections.singletonList(StringUtils.EMPTY))) {
+ private static final long serialVersionUID = -7834632442532690940L;
- confRestClient.delete(attr.getSchema());
- } else {
- confRestClient.set(attr);
- }
+ @Override
+ public Page createPage() {
+ return new ConfModalPage(getPageReference(), editNotificationWin, parameters);
}
+ });
- info(getString(Constants.OPERATION_SUCCEEDED));
- feedbackPanel.refresh(target);
- } catch (Exception e) {
- LOG.error("While updating configuration parameters", e);
- error(getString(Constants.ERROR) + ": " + e.getMessage());
- feedbackPanel.refresh(target);
- }
+ syncopeConfWin.show(target);
}
};
- MetaDataRoleAuthorizationStrategy.authorize(save, ENABLE, xmlRolesReader.getAllAllowedRoles(
- "Configuration", "set"));
- form.add(save);
+ parameters.add(confLink);
Link<Void> dbExportLink = new Link<Void>("dbExportLink") {
@@ -422,16 +414,6 @@ public class Configuration extends BasePage {
add(notificationContainer);
- createNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- createNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
- createNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
- createNotificationWin.setCookieName("create-notification-modal");
-
- editNotificationWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- editNotificationWin.setInitialHeight(NOTIFICATION_WIN_HEIGHT);
- editNotificationWin.setInitialWidth(NOTIFICATION_WIN_WIDTH);
- editNotificationWin.setCookieName("edit-notification-modal");
-
setWindowClosedCallback(createNotificationWin, notificationContainer);
setWindowClosedCallback(editNotificationWin, notificationContainer);
@@ -565,16 +547,6 @@ public class Configuration extends BasePage {
add(securityQuestionContainer);
- createSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- createSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
- createSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
- createSecurityQuestionWin.setCookieName("create-security-question-modal");
-
- editSecurityQuestionWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
- editSecurityQuestionWin.setInitialHeight(SECURITY_QUESTION_WIN_HEIGHT);
- editSecurityQuestionWin.setInitialWidth(SECURITY_QUESTION_WIN_WIDTH);
- editSecurityQuestionWin.setCookieName("edit-security-question-modal");
-
setWindowClosedCallback(createSecurityQuestionWin, securityQuestionContainer);
setWindowClosedCallback(editSecurityQuestionWin, securityQuestionContainer);
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
index 715cd10..63405af 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
@@ -32,7 +32,6 @@ import org.apache.syncope.console.commons.Constants;
import org.apache.syncope.console.pages.panels.LoggerCategoryPanel;
import org.apache.syncope.console.pages.panels.RoleSearchPanel;
import org.apache.syncope.console.pages.panels.UserSearchPanel;
-import org.apache.syncope.console.rest.ConfigurationRestClient;
import org.apache.syncope.console.rest.LoggerRestClient;
import org.apache.syncope.console.rest.NotificationRestClient;
import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
@@ -63,9 +62,6 @@ class NotificationModalPage extends BaseModalPage {
private NotificationRestClient restClient;
@SpringBean
- private ConfigurationRestClient confRestClient;
-
- @SpringBean
private LoggerRestClient loggerRestClient;
public NotificationModalPage(final PageReference pageRef, final ModalWindow window,
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java b/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
index ffd7ff4..095399b 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
@@ -74,7 +74,7 @@ public class RoleModalPage extends BaseModalPage {
originalRoleTO = SerializationUtils.clone(roleTO);
}
- final Form<RoleTO> form = new Form<RoleTO>("RoleForm");
+ final Form<RoleTO> form = new Form<RoleTO>("roleForm");
form.setMultiPart(true);
add(new Label("displayName", roleTO.getId() == 0 ? "" : roleTO.getDisplayName()));
@@ -110,6 +110,8 @@ public class RoleModalPage extends BaseModalPage {
feedbackPanel.refresh(target);
}
};
+ form.add(submit);
+ form.setDefaultButton(submit);
final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
@@ -120,29 +122,24 @@ public class RoleModalPage extends BaseModalPage {
closeAction(target, form);
}
};
-
cancel.setDefaultFormProcessing(false);
+ form.add(cancel);
MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Roles",
createFlag
- ? "create"
- : "update"));
-
- form.add(submit);
- form.setDefaultButton(submit);
-
- form.add(cancel);
+ ? "create"
+ : "update"));
add(form);
}
- protected void submitAction(final AjaxRequestTarget target, final Form form) {
+ protected void submitAction(final AjaxRequestTarget target, final Form<?> form) {
final RoleTO roleTO = (RoleTO) form.getDefaultModelObject();
final List<String> entitlementList = new ArrayList<String>(rolePanel.getSelectedEntitlements());
roleTO.getEntitlements().clear();
roleTO.getEntitlements().addAll(entitlementList);
- final RoleTO result;
+ RoleTO result;
if (createFlag) {
result = roleRestClient.create(roleTO);
} else {
@@ -159,7 +156,7 @@ public class RoleModalPage extends BaseModalPage {
setResponsePage(new ResultStatusModalPage.Builder(window, result).build());
}
- protected void closeAction(final AjaxRequestTarget target, final Form form) {
+ protected void closeAction(final AjaxRequestTarget target, final Form<?> form) {
window.close(target);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
index e0f9d3a..072b421 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSummaryPanel.java
@@ -107,8 +107,8 @@ public class RoleSummaryPanel extends Panel {
Fragment fragment = new Fragment("roleSummaryPanel",
builder.selectedNodeId == null
- ? "fakerootFrag"
- : (builder.selectedNodeId == 0 ? "rootPanel" : "roleViewPanel"),
+ ? "fakerootFrag"
+ : (builder.selectedNodeId == 0 ? "rootPanel" : "roleViewPanel"),
this);
if (builder.selectedNodeId != null) {
@@ -130,9 +130,7 @@ public class RoleSummaryPanel extends Panel {
@Override
public Page createPage() {
- RoleTO roleTO = new RoleTO();
- RoleModalPage form = new RoleModalPage(builder.callerPageRef, builder.window, roleTO);
- return form;
+ return new RoleModalPage(builder.callerPageRef, builder.window, new RoleTO());
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
index 04668ab..0cce34a 100644
--- a/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
+++ b/console/src/main/java/org/apache/syncope/console/pages/panels/RoleTabPanel.java
@@ -84,8 +84,7 @@ public class RoleTabPanel extends Panel {
public Page createPage() {
RoleTO roleTO = new RoleTO();
roleTO.setParent(selectedNode.getId());
- RoleModalPage form = new RoleModalPage(pageRef, window, roleTO);
- return form;
+ return new RoleModalPage(pageRef, window, roleTO);
}
});
@@ -124,8 +123,7 @@ public class RoleTabPanel extends Panel {
@Override
public Page createPage() {
RoleTO roleTO = roleRestClient.read(selectedNode.getId());
- RoleModalPage form = new RoleModalPage(pageRef, window, roleTO);
- return form;
+ return new RoleModalPage(pageRef, window, roleTO);
}
});
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
----------------------------------------------------------------------
diff --git a/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java b/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
index c650812..d1e4b78 100644
--- a/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
+++ b/console/src/main/java/org/apache/syncope/console/rest/ConfigurationRestClient.java
@@ -19,6 +19,7 @@
package org.apache.syncope.console.rest;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import javax.ws.rs.core.Response;
import org.apache.syncope.common.SyncopeClientException;
@@ -40,7 +41,18 @@ public class ConfigurationRestClient extends BaseRestClient {
private SchemaRestClient schemaRestClient;
public ConfTO list() {
- return getService(ConfigurationService.class).list();
+ ConfTO conf = getService(ConfigurationService.class).list();
+
+ for (Iterator<AttributeTO> it = conf.getAttrs().iterator(); it.hasNext();) {
+ AttributeTO attr = it.next();
+ for (AttrLayoutType type : AttrLayoutType.values()) {
+ if (type.getConfKey().equals(attr.getSchema())) {
+ it.remove();
+ }
+ }
+ }
+
+ return conf;
}
public AttributeTO read(final String key) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html
new file mode 100644
index 0000000..4ce5575
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.html
@@ -0,0 +1,39 @@
+<!--
+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">
+ <wicket:extend>
+ <div style="margin: 5px;">
+ <p class="ui-widget ui-corner-all ui-widget-header">
+ <wicket:message key="title"/>
+ </p>
+ <form wicket:id="confForm">
+ <span wicket:id="paramAttrs"/>
+
+ <div style="bottom:0;margin:10px">
+ <input type="submit"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="submit"/>
+ <input type="button"
+ class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
+ wicket:id="cancel"/>
+ </div>
+ </form>
+ </div>
+ </wicket:extend>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties
new file mode 100644
index 0000000..363bef4
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage.properties
@@ -0,0 +1,17 @@
+# 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.
+title=Parameters
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties
new file mode 100644
index 0000000..0fd85ae
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_it.properties
@@ -0,0 +1,17 @@
+# 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.
+title=Parametri
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties
new file mode 100644
index 0000000..e7f3992
--- /dev/null
+++ b/console/src/main/resources/org/apache/syncope/console/pages/ConfModalPage_pt_BR.properties
@@ -0,0 +1,17 @@
+# 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.
+title=Par\u00e2metros
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html b/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
index 78cd215..f3699b8 100644
--- a/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
+++ b/console/src/main/resources/org/apache/syncope/console/pages/Configuration.html
@@ -32,9 +32,8 @@ under the License.
<div id="tabs">
<ul>
<li class="tabs-selected">
- <a href="#parameters"><span><wicket:message key="parameters"/></span></a>
+ <a href="#layouts"><span><wicket:message key="layouts"/></span></a>
</li>
- <li><a href="#layouts"><span><wicket:message key="layouts"/></span></a></li>
<li><a href="#policies"><span><wicket:message key="policies"/></span></a></li>
<li><a href="#notifications"><span><wicket:message key="notifications"/></span></a></li>
<li><a href="#securityQuestions"><span><wicket:message key="securityQuestions"/></span></a></li>
@@ -70,17 +69,7 @@ under the License.
<div id="selfMembership" style="border-width: 1px;border-top-width: 0px;">
<span wicket:id="selfMembershipLayoutPanel">[self membership layout panel]</span>
</div>
- </div>
- <div id="parameters" wicket:id="parameters" style="width: 700px;">
- <form wicket:id="confForm">
- <span wicket:id="parameters">[parameters]</span>
-
- <a class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="saveParameters">
- <wicket:message key="apply"/>
- </a>
- </form>
- </div>
+ </div>
<div id="policies">
<ul>
<li class="tabs-selected">
@@ -220,8 +209,16 @@ under the License.
</div>
</div>
<div>
+ <div wicket:id="parameters">
+ <a style="position: absolute; top: 2px; right:50px;" wicket:id="confLink">
+ <img src="img/actions/settings-icon.png" width="30" height="30"
+ alt="Parameters" title="title" wicket:message="title:parameters"/>
+ </a>
+ </div>
+ <div wicket:id="syncopeConfWin">[Show modal window for conf parameters]</div>
+
<a style="position: absolute; top: 2px; right:20px;" wicket:id="dbExportLink">
- <img src="img/db_export.png"width="30" height="30"
+ <img src="img/db_export.png" width="30" height="30"
alt="DB export" title="title" wicket:message="title:db_export"/>
</a>
</div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
----------------------------------------------------------------------
diff --git a/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html b/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
index 8e00c10..3f54815 100644
--- a/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
+++ b/console/src/main/resources/org/apache/syncope/console/pages/RoleModalPage.html
@@ -22,7 +22,7 @@ under the License.
<p class="ui-widget ui-corner-all ui-widget-header">
<wicket:message key="title"/> <span wicket:id="displayName"/>
</p>
- <form wicket:id="RoleForm">
+ <form wicket:id="roleForm">
<div id="tabs">
<div style="display: block; clear: both">
<ul>
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/main/webapp/img/db_export.png
----------------------------------------------------------------------
diff --git a/console/src/main/webapp/img/db_export.png b/console/src/main/webapp/img/db_export.png
index 540f666..413cb06 100644
Binary files a/console/src/main/webapp/img/db_export.png and b/console/src/main/webapp/img/db_export.png differ
http://git-wip-us.apache.org/repos/asf/syncope/blob/8fc6e9e5/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
----------------------------------------------------------------------
diff --git a/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java b/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
index 1ec720d..8647efe 100644
--- a/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
+++ b/console/src/test/java/org/apache/syncope/console/ConfigurationTestITCase.java
@@ -31,14 +31,23 @@ public class ConfigurationTestITCase extends AbstractTest {
seleniumDriver.findElement(By.xpath("//img[@alt=\"Configuration\"]")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//img[@title='Parameters']")));
- seleniumDriver.findElement(By.xpath("//span[contains(text(), 'log.lastlogindate')]/../../div[2]/span/input")).
- click();
- seleniumDriver.findElement(By.xpath("//div[@id='parameters']/form/a")).click();
+ seleniumDriver.findElement(By.xpath("//img[@title='Parameters']/ancestor::a")).click();
+
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
+ seleniumDriver.switchTo().frame(0);
+
+ seleniumDriver.findElement(
+ By.xpath("//span[contains(text(), 'log.lastlogindate')]/../../div[2]/span/input")).click();
+ seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/input[@type='submit']")).click();
+
+ seleniumDriver.switchTo().defaultContent();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("feedback")));
- assertTrue(seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
+ assertTrue(
+ seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
}
@Test
@@ -47,13 +56,13 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[2]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='policies']/ul/li[2]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='password']/span/div/a")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
- wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='id:textField']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='id:textField']")));
WebElement element = seleniumDriver.findElement(By.name("description:textField"));
element.sendKeys("new description");
@@ -63,7 +72,8 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("feedback")));
- assertTrue(seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
+ assertTrue(
+ seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
}
@Test
@@ -83,7 +93,7 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[7]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[6]/a")).click();
final Select select = new Select(
seleniumDriver.findElement(By.xpath("//div[@id='core']/div/span/table/tbody/tr/td[2]/select")));
@@ -91,7 +101,8 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='workflow']/div/span/img")));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("feedback")));
- assertTrue(seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
+ assertTrue(
+ seleniumDriver.findElement(By.tagName("body")).getText().contains("Operation executed successfully"));
}
@Test
@@ -100,16 +111,16 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[4]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='notifications']/a")).click();
-
+
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[2]/form/div[3]/div/div/div/div/label")));
- wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
seleniumDriver.findElement(By.name("sender:textField")).sendKeys("test@syncope.it");
@@ -172,8 +183,9 @@ public class ConfigurationTestITCase extends AbstractTest {
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/div[4]/div/div/span/input")).click();
- wait.until(ExpectedConditions.elementToBeClickable(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")));
-
+ wait.until(ExpectedConditions.elementToBeClickable(By.name(
+ "staticRecipients:multiValueContainer:view:0:panel:textField")));
+
seleniumDriver.findElement(By.name(
"staticRecipients:multiValueContainer:view:0:panel:textField")).
sendKeys("syncope445@syncope.apache.org");
@@ -192,13 +204,13 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[4]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='notifications']/a")).click();
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
-
+
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[2]/form/div[3]/div/div/div/div/label")));
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
@@ -254,7 +266,8 @@ public class ConfigurationTestITCase extends AbstractTest {
+ "/option[text()='resource-db-sync']")));
select = new Select(
- seleniumDriver.findElement(By.xpath("//select[@name='eventSelection:categoryContainer:subcategory:dropDownChoiceField']")));
+ seleniumDriver.findElement(By.xpath(
+ "//select[@name='eventSelection:categoryContainer:subcategory:dropDownChoiceField']")));
select.selectByVisibleText("resource-db-sync");
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(
@@ -266,15 +279,16 @@ public class ConfigurationTestITCase extends AbstractTest {
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/ul/li[4]/a/span")).click();
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/div[4]/div/div/span/input")).click();
-
- wait.until(ExpectedConditions.elementToBeClickable(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")));
-
+
+ wait.until(ExpectedConditions.elementToBeClickable(By.name(
+ "staticRecipients:multiValueContainer:view:0:panel:textField")));
+
seleniumDriver.findElement(
By.name("staticRecipients:multiValueContainer:view:0:panel:textField"))
.sendKeys("syncope492@syncope.apache.org");
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(
- "//div[2]/form/div[3]/div[4]/div/div[2]/label")));
+ "//div[2]/form/div[3]/div[4]/div/div[2]/label")));
seleniumDriver.findElement(By.xpath("//div[2]/form/div[4]/input")).click();
@@ -287,16 +301,16 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[@id='tabs']")));
- seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[4]/a")).click();
+ seleniumDriver.findElement(By.xpath("//div[@id='tabs']/ul/li[3]/a")).click();
seleniumDriver.findElement(By.xpath("//div[@id='notifications']/a")).click();
-
+
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//iframe")));
seleniumDriver.switchTo().frame(0);
wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//div[2]/form/div[3]/div/div/div/div/label")));
- wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
+ wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//input[@name='sender:textField']")));
seleniumDriver.findElement(By.name("sender:textField")).sendKeys("syncope446@syncope.it");
seleniumDriver.findElement(By.name("subject:textField")).sendKeys("Test issue Syncope 446");
@@ -352,7 +366,7 @@ public class ConfigurationTestITCase extends AbstractTest {
wait.until(ExpectedConditions.presenceOfElementLocated(
By.xpath("//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:type']"
+ "/option[text()='ENTITLEMENT']")));
-
+
wait.until(ExpectedConditions.elementToBeClickable(
By.xpath("//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:type']")));
@@ -365,19 +379,19 @@ public class ConfigurationTestITCase extends AbstractTest {
"//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:property']"
+ "/option[text()='ROLE_CREATE']")));
- select = new Select(
- seleniumDriver.findElement(By.xpath(
- "//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:property']")));
+ select = new Select(seleniumDriver.findElement(By.xpath(
+ "//select[@name='aboutContainer:roleAbout:searchFormContainer:searchView:0:property']")));
select.selectByVisibleText("ROLE_CREATE");
seleniumDriver.findElement(By.xpath("//div[2]/form/div[3]/ul/li[4]/a/span")).click();
seleniumDriver.findElement(By.xpath("//input[@name='recipientsContainer:checkRecipients:checkboxField']")).
click();
- wait.until(ExpectedConditions.elementToBeClickable(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")));
-
- seleniumDriver.findElement(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")).sendKeys(
- "syncope446@syncope.apache.org");
+ wait.until(ExpectedConditions.elementToBeClickable(By.name(
+ "staticRecipients:multiValueContainer:view:0:panel:textField")));
+
+ seleniumDriver.findElement(By.name("staticRecipients:multiValueContainer:view:0:panel:textField")).
+ sendKeys("syncope446@syncope.apache.org");
seleniumDriver.findElement(By.xpath("//div[2]/form/div[4]/input")).click();
[3/3] git commit: Merge branch '1_2_X'
Posted by il...@apache.org.
Merge branch '1_2_X'
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7530ea21
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7530ea21
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7530ea21
Branch: refs/heads/master
Commit: 7530ea211bfc12397300ff76e401a755ccd03d6a
Parents: 8614d33 8fc6e9e
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Oct 30 16:46:10 2014 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Thu Oct 30 16:46:10 2014 +0100
----------------------------------------------------------------------
.../syncope/console/pages/AbstractBasePage.java | 6 +-
.../syncope/console/pages/ConfModalPage.java | 111 +++++++++++++++++++
.../syncope/console/pages/Configuration.java | 106 +++++++-----------
.../console/pages/NotificationModalPage.java | 4 -
.../syncope/console/pages/RoleModalPage.java | 21 ++--
.../console/pages/panels/RoleSummaryPanel.java | 8 +-
.../console/pages/panels/RoleTabPanel.java | 6 +-
.../console/rest/ConfigurationRestClient.java | 14 ++-
.../syncope/console/pages/ConfModalPage.html | 39 +++++++
.../console/pages/ConfModalPage.properties | 17 +++
.../console/pages/ConfModalPage_it.properties | 17 +++
.../pages/ConfModalPage_pt_BR.properties | 17 +++
.../syncope/console/pages/Configuration.html | 25 ++---
.../syncope/console/pages/RoleModalPage.html | 2 +-
console/src/main/webapp/img/db_export.png | Bin 1105 -> 16675 bytes
.../console/ConfigurationTestITCase.java | 78 +++++++------
16 files changed, 330 insertions(+), 141 deletions(-)
----------------------------------------------------------------------