syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject [1/4] syncope git commit: [SYNCOPE-962] Initial changes
Date Fri, 28 Oct 2016 19:12:30 GMT
Repository: syncope
Updated Branches:
  refs/heads/2_0_X 43fe9e87c -> dd9e95ee1
  refs/heads/master 52cd67f80 -> 2d2afac91


[SYNCOPE-962] Initial changes


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1bc21e3e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1bc21e3e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1bc21e3e

Branch: refs/heads/2_0_X
Commit: 1bc21e3eb330f44c490baf3448565b4fa6598308
Parents: 43fe9e8
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Fri Oct 28 13:05:53 2016 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Fri Oct 28 13:05:53 2016 +0200

----------------------------------------------------------------------
 .../syncope/client/console/pages/BasePage.java  | 10 +--
 .../topology/TopologyWebSocketBehavior.java     |  4 +-
 .../html/form/AjaxDropDownChoicePanel.java      |  2 +-
 .../ws/api/SyncopeWebSocketBehavior.java        | 93 ++++++++++++++++++++
 .../syncope/client/console/pages/Login.html     |  3 +-
 .../console/pages/MustChangePassword.html       |  3 +-
 .../client/console/panels/RealmChoicePanel.html |  2 +-
 .../markup/html/form/AbstractFieldPanel.html    |  2 +-
 pom.xml                                         |  8 +-
 9 files changed, 109 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
index aa30144..dc3f724 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
@@ -34,6 +34,7 @@ import org.apache.syncope.client.console.rest.ConfigurationRestClient;
 import org.apache.syncope.client.console.topology.Topology;
 import org.apache.syncope.client.console.wicket.markup.head.MetaHeaderItem;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
+import org.apache.syncope.client.console.wicket.protocol.ws.api.SyncopeWebSocketBehavior;
 import org.apache.syncope.client.console.widgets.ApprovalsWidget;
 import org.apache.syncope.client.console.widgets.JobWidget;
 import org.apache.syncope.client.console.widgets.ReconciliationWidget;
@@ -60,7 +61,6 @@ import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.protocol.ws.api.WebSocketBehavior;
 import org.apache.wicket.protocol.ws.api.message.ConnectedMessage;
 import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
@@ -88,7 +88,7 @@ public class BasePage extends WebPage implements IAjaxIndicatorAware {
         super(parameters);
 
         // Native WebSocket
-        add(new WebSocketBehavior() {
+        add(new SyncopeWebSocketBehavior() {
 
             private static final long serialVersionUID = 3109256773218160485L;
 
@@ -306,9 +306,9 @@ public class BasePage extends WebPage implements IAjaxIndicatorAware {
         }
 
         // Extensions
-        ClassPathScanImplementationLookup classPathScanImplementationLookup
-                = (ClassPathScanImplementationLookup) SyncopeConsoleApplication.get().
-                getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP);
+        ClassPathScanImplementationLookup classPathScanImplementationLookup =
+                (ClassPathScanImplementationLookup) SyncopeConsoleApplication.get().
+                        getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP);
         List<Class<? extends BaseExtPage>> extPageClasses = classPathScanImplementationLookup.getExtPageClasses();
 
         WebMarkupContainer extensionsLI = new WebMarkupContainer(getLIContainerId("extensions"));

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyWebSocketBehavior.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyWebSocketBehavior.java
b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyWebSocketBehavior.java
index 6346332..def404e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyWebSocketBehavior.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyWebSocketBehavior.java
@@ -28,18 +28,18 @@ import java.util.Set;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
 import org.apache.syncope.client.console.rest.ConnectorRestClient;
 import org.apache.syncope.client.console.rest.ResourceRestClient;
+import org.apache.syncope.client.console.wicket.protocol.ws.api.SyncopeWebSocketBehavior;
 import org.apache.syncope.common.lib.to.ConnInstanceTO;
 import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.wicket.Application;
 import org.apache.wicket.Session;
 import org.apache.wicket.ThreadContext;
-import org.apache.wicket.protocol.ws.api.WebSocketBehavior;
 import org.apache.wicket.protocol.ws.api.WebSocketRequestHandler;
 import org.apache.wicket.protocol.ws.api.message.TextMessage;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class TopologyWebSocketBehavior extends WebSocketBehavior {
+public class TopologyWebSocketBehavior extends SyncopeWebSocketBehavior {
 
     private static final long serialVersionUID = -1653665542635275551L;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
index 6b9696f..4fbc518 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java
@@ -45,7 +45,7 @@ public class AjaxDropDownChoicePanel<T extends Serializable> extends
FieldPanel<
         super(id, name, model);
 
         field = new BootstrapSelect<>(
-                "dropDownChoiceField", model, Collections.<T>emptyList(), new ChoiceRenderer<T>());
+                "dropDownChoiceField", model, Collections.<T>emptyList(), new ChoiceRenderer<>());
         add(field.setLabel(new Model<>(name)).setOutputMarkupId(true));
 
         if (enableOnBlur) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/java/org/apache/syncope/client/console/wicket/protocol/ws/api/SyncopeWebSocketBehavior.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/protocol/ws/api/SyncopeWebSocketBehavior.java
b/client/console/src/main/java/org/apache/syncope/client/console/wicket/protocol/ws/api/SyncopeWebSocketBehavior.java
new file mode 100644
index 0000000..b104c77
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/protocol/ws/api/SyncopeWebSocketBehavior.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.protocol.ws.api;
+
+import java.util.Map;
+import org.apache.wicket.Component;
+import org.apache.wicket.MetaDataKey;
+import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
+import org.apache.wicket.markup.head.IHeaderResponse;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
+import org.apache.wicket.protocol.ws.WebSocketSettings;
+import org.apache.wicket.protocol.ws.api.WebSocketBehavior;
+import org.apache.wicket.protocol.ws.api.WicketWebSocketJQueryResourceReference;
+import org.apache.wicket.request.cycle.RequestCycle;
+import org.apache.wicket.util.lang.Args;
+import org.apache.wicket.util.lang.Generics;
+import org.apache.wicket.util.template.PackageTextTemplate;
+
+/**
+ * Temporary work-around class for WICKET-6262.
+ */
+public abstract class SyncopeWebSocketBehavior extends WebSocketBehavior {
+
+    private static final long serialVersionUID = -2137694236966234985L;
+
+    private static final MetaDataKey<Object> IS_JAVA_SCRIPT_CONTRIBUTED = new MetaDataKey<Object>()
{
+
+        private static final long serialVersionUID = 3109256773218160485L;
+
+    };
+
+    @Override
+    public void renderHead(final Component component, final IHeaderResponse response) {
+        RequestCycle cycle = component.getRequestCycle();
+        if (cycle.find(IPartialPageRequestHandler.class) == null) {
+            Object contributed = cycle.getMetaData(IS_JAVA_SCRIPT_CONTRIBUTED);
+            if (contributed == null) {
+                cycle.setMetaData(IS_JAVA_SCRIPT_CONTRIBUTED, new Object());
+
+                response.render(JavaScriptHeaderItem.forReference(WicketWebSocketJQueryResourceReference.get()));
+
+                PackageTextTemplate webSocketSetupTemplate =
+                        new PackageTextTemplate(WicketWebSocketJQueryResourceReference.class,
+                                "res/js/wicket-websocket-setup.js.tmpl");
+
+                Map<String, Object> variables = Generics.newHashMap();
+
+                // set falsy JS values for the non-used parameter
+                int pageId = component.getPage().getPageId();
+                variables.put("pageId", pageId);
+                variables.put("resourceName", "");
+
+                WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(component.getApplication());
+
+                CharSequence baseUrl = getBaseUrl(webSocketSettings);
+                Args.notNull(baseUrl, "baseUrl");
+                variables.put("baseUrl", baseUrl);
+
+                CharSequence contextPath = getContextPath(webSocketSettings);
+                Args.notNull(contextPath, "contextPath");
+                variables.put("contextPath", contextPath);
+
+                // preserve the application name for JSR356 based impl
+                variables.put("applicationName", component.getApplication().getName());
+
+                CharSequence filterPrefix = getFilterPrefix(webSocketSettings);
+                Args.notNull(filterPrefix, "filterPrefix");
+                variables.put("filterPrefix", filterPrefix);
+
+                String webSocketSetupScript = webSocketSetupTemplate.asString(variables);
+
+                response.render(OnDomReadyHeaderItem.forScript(webSocketSetupScript));
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
index eb98bb8..68e9283 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Login.html
@@ -55,8 +55,7 @@ under the License.
               <select wicket:id="domain"/>
             </fieldset>
 
-            <button wicket:id="submit" type="submit" 
-                    class="btn btn-lg btn-primary btn-block btn-signin"><wicket:message
key="submit"/></button>
+            <button wicket:id="submit" type="submit" class="btn btn-lg btn-primary btn-block
btn-signin"></button>
           </fieldset>
         </form>
       </div>

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
index e7122f6..279e5f0 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/MustChangePassword.html
@@ -50,8 +50,7 @@ under the License.
                  wicket:message="placeholder:username" required="required" autofocus="autofocus"
/>
           <span wicket:id="password" id="password"/>
           <span wicket:id="confirmPassword" id="confirmPassword"/>
-          <button wicket:id="submit" type="submit" 
-                  class="btn btn-lg btn-primary btn-block btn-signin"><wicket:message
key="submit"/></button>
+          <button wicket:id="submit" type="submit" class="btn btn-lg btn-primary btn-block
btn-signin"></button>
         </form>
       </div>
     </div>

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmChoicePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmChoicePanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmChoicePanel.html
index 6ead5a4..a918dac 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmChoicePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/RealmChoicePanel.html
@@ -23,7 +23,7 @@ under the License.
         Realm: <label wicket:id="realm"/>
       </div>
       <div class="realm-choice">
-        <button wicket:id="realms"/>
+        <button wicket:id="realms"></button>
       </div>
     </div>
   </wicket:panel>

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
index c1ac297..1fd3275 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/AbstractFieldPanel.html
@@ -29,6 +29,6 @@ under the License.
     <wicket:fragment wicket:id="emptyFragment">
     </wicket:fragment>
 
-    <wicket:child />
+    <wicket:child/>
   </wicket:panel>
 </html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/1bc21e3e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index bb8b311..e77abd9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -402,7 +402,7 @@ under the License.
     <activiti-modeler.directory>${project.build.directory}/activiti-modeler</activiti-modeler.directory>
 
     <swagger-core.version>1.5.10</swagger-core.version>    
-    <swagger-ui.version>2.2.5</swagger-ui.version>
+    <swagger-ui.version>2.2.6</swagger-ui.version>
 
     <jquery.version>2.2.4</jquery.version>
     <jquery-ui.version>1.11.4</jquery-ui.version>
@@ -410,7 +410,7 @@ under the License.
     <jquery-cookie.version>1.4.1-1</jquery-cookie.version>
     
     <bootstrap.version>3.3.7</bootstrap.version>
-    <bootstrap-select.version>1.7.3</bootstrap-select.version>
+    <bootstrap-select.version>1.11.2</bootstrap-select.version>
     <bootstrap-fileinput.version>4.3.5</bootstrap-fileinput.version>
     <bootbox.version>4.4.0</bootbox.version>
     <font-awesome.version>4.6.3</font-awesome.version>
@@ -419,9 +419,9 @@ under the License.
     <codemirror.version>5.13.2</codemirror.version>
     <jsplumb.version>2.0.7</jsplumb.version>
     
-    <wicket.version>7.4.0</wicket.version>
+    <wicket.version>7.5.0</wicket.version>
     <wicket-jqueryui.version>7.4.0</wicket-jqueryui.version>
-    <wicket-bootstrap.version>0.10.10</wicket-bootstrap.version>
+    <wicket-bootstrap.version>0.10.11</wicket-bootstrap.version>
     <wicket-chartjs.version>7.0.1</wicket-chartjs.version>
 
     <angular.version>1.5.8</angular.version>


Mime
View raw message