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 2015/04/27 16:58:08 UTC

[4/4] syncope git commit: [SYNCOPE-156] Using selected admin template for login and base (empty) dashboard

[SYNCOPE-156] Using selected admin template for login and base (empty) dashboard


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

Branch: refs/heads/master
Commit: 6cdae68327a00e8cbc435aeef77a71f7da023756
Parents: 4f20b41
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Apr 27 16:57:45 2015 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Apr 27 16:57:45 2015 +0200

----------------------------------------------------------------------
 client/console/pom.xml                          |   38 +-
 .../console/SyncopeConsoleApplication.java      |   24 +-
 .../client/console/SyncopeConsoleSession.java   |    7 -
 .../client/console/pages/AbstractBasePage.java  |    4 -
 .../syncope/client/console/pages/BasePage.java  |   35 +
 .../syncope/client/console/pages/Dashboard.java |   30 +
 .../syncope/client/console/pages/HomePage.java  |   34 -
 .../syncope/client/console/pages/Login.java     |  160 +
 .../syncope/client/console/pages/Logout.java    |   37 +
 .../syncope/client/console/pages/SignOut.java   |   35 -
 .../console/panels/NotificationPanel.java       |   34 +-
 .../META-INF/resources/css/AdminLTE.css         | 4066 ++++++++++++++++++
 .../resources/css/AdminLTE_skins/_all-skins.css |  876 ++++
 .../resources/css/AdminLTE_skins/skin-black.css |  165 +
 .../resources/css/AdminLTE_skins/skin-blue.css  |  151 +
 .../resources/css/AdminLTE_skins/skin-green.css |  140 +
 .../css/AdminLTE_skins/skin-purple.css          |  140 +
 .../resources/css/AdminLTE_skins/skin-red.css   |  140 +
 .../css/AdminLTE_skins/skin-yellow.css          |  140 +
 .../resources/META-INF/resources/css/login.css  |  124 +
 .../META-INF/resources/css/syncopeConsole.css   |   59 +
 .../resources/META-INF/resources/img/busy.gif   |  Bin 0 -> 2834 bytes
 .../META-INF/resources/img/favicon.png          |  Bin 0 -> 641 bytes
 .../META-INF/resources/img/logo-green.png       |  Bin 0 -> 12178 bytes
 .../resources/META-INF/resources/img/logo.png   |  Bin 0 -> 8913 bytes
 .../META-INF/resources/js/AdminLTE-app.min.js   |   13 +
 .../syncope/client/console/pages/BasePage.html  |  202 +-
 .../syncope/client/console/pages/Dashboard.html |   35 +
 .../syncope/client/console/pages/HomePage.html  |   33 -
 .../syncope/client/console/pages/Login.html     |   67 +
 .../client/console/pages/Login.properties       |   20 +
 .../client/console/pages/Login_it.properties    |   20 +
 .../client/console/pages/Login_pt_BR.properties |   20 +
 .../syncope/client/console/pages/SignOut.html   |   33 -
 deb/console/pom.xml                             |    9 -
 deb/core/pom.xml                                |   13 -
 fit/console-reference/pom.xml                   |    9 -
 fit/core-reference/pom.xml                      |   13 -
 pom.xml                                         |   48 +-
 39 files changed, 6637 insertions(+), 337 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/pom.xml
----------------------------------------------------------------------
diff --git a/client/console/pom.xml b/client/console/pom.xml
index 35185f1..e95a728 100644
--- a/client/console/pom.xml
+++ b/client/console/pom.xml
@@ -65,19 +65,16 @@ under the License.
     <dependency>
       <groupId>org.apache.wicket</groupId>
       <artifactId>wicket-spring</artifactId>
-      <!-- exclude spring framework that wicket pulls in -->
-      <exclusions>
-        <exclusion>
-          <groupId>org.springframework</groupId>
-          <artifactId>spring</artifactId>
-        </exclusion>
-      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.wicket</groupId>
       <artifactId>wicket-auth-roles</artifactId>
     </dependency>
-    
+    <dependency>
+      <groupId>com.googlecode.wicket-jquery-ui</groupId>
+      <artifactId>wicket-jquery-ui</artifactId>
+    </dependency>
+      
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-core</artifactId>
@@ -88,6 +85,31 @@ under the License.
       <artifactId>syncope-client-lib</artifactId>
       <version>${project.version}</version>
     </dependency>
+
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>bootstrap</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>bootstrap-select</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>font-awesome</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>ionicons</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>highlightjs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.webjars</groupId>
+      <artifactId>codemirror</artifactId>
+    </dependency>
   </dependencies>
   
   <build>

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
index d3de8b2..b7b442f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
@@ -18,28 +18,38 @@
  */
 package org.apache.syncope.client.console;
 
-import org.apache.syncope.client.console.pages.HomePage;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import org.apache.syncope.client.console.pages.Dashboard;
+import org.apache.syncope.client.console.pages.Login;
 import org.apache.wicket.Page;
 import org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession;
 import org.apache.wicket.authroles.authentication.AuthenticatedWebApplication;
-import org.apache.wicket.authroles.authentication.pages.SignInPage;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.resource.DynamicJQueryResourceReference;
 import org.apache.wicket.spring.injection.annot.SpringComponentInjector;
 
 public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
 
+    public static final List<Locale> SUPPORTED_LOCALES = Collections.unmodifiableList(Arrays.asList(
+            new Locale[] {
+                Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR")
+            }));
+
     @Override
     protected void init() {
         super.init();
 
         getComponentInstantiationListeners().add(new SpringComponentInjector(this));
-        getSecuritySettings().setAuthorizationStrategy(new MetaDataRoleAuthorizationStrategy(this));
+        getJavaScriptLibrarySettings().setJQueryReference(new DynamicJQueryResourceReference());
 
+        getSecuritySettings().setAuthorizationStrategy(new MetaDataRoleAuthorizationStrategy(this));
         MetaDataRoleAuthorizationStrategy.authorize(getHomePage(), SyncopeConsoleSession.AUTHENTICATED);
 
-        mountPage("/home", HomePage.class);
-        mountPage("/login", SignInPage.class);
+        mountPage("/login", getSignInPageClass());
     }
 
     @Override
@@ -49,12 +59,12 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
 
     @Override
     protected Class<? extends WebPage> getSignInPageClass() {
-        return SignInPage.class;
+        return Login.class;
     }
 
     @Override
     public Class<? extends Page> getHomePage() {
-        return HomePage.class;
+        return Dashboard.class;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index b63a86a..31ef98e 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -19,10 +19,8 @@
 package org.apache.syncope.client.console;
 
 import java.text.DateFormat;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -49,11 +47,6 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
 
     private static final long serialVersionUID = 747562246415852166L;
 
-    public static final List<Locale> SUPPORTED_LOCALES = Collections.unmodifiableList(Arrays.asList(
-            new Locale[] {
-                Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR")
-            }));
-
     public static final String AUTHENTICATED = "AUTHENTICATED";
 
     private static final Logger LOG = LoggerFactory.getLogger(SyncopeConsoleSession.class);

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
index 38408f9..d63de02 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AbstractBasePage.java
@@ -45,10 +45,6 @@ public class AbstractBasePage extends WebPage {
 
     protected static final Logger LOG = LoggerFactory.getLogger(AbstractBasePage.class);
 
-    protected static final String TASKS = "Tasks";
-
-    protected static final String FORM = "form";
-
     protected static final String CANCEL = "cancel";
 
     protected static final String SUBMIT = "submit";

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/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 7547448..1cfc535 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
@@ -18,7 +18,15 @@
  */
 package org.apache.syncope.client.console.pages;
 
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.wicket.Page;
+import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.IAjaxIndicatorAware;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
@@ -31,6 +39,10 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
 
     public BasePage(final PageParameters parameters) {
         super(parameters);
+
+        add(new Label("version", SyncopeConsoleSession.get().getVersion()));
+        add(new Label("username", SyncopeConsoleSession.get().getSelfTO().getUsername()));
+        add(new BookmarkablePageLink<Page>("logout", Logout.class));
     }
 
     @Override
@@ -38,4 +50,27 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
         return "veil";
     }
 
+    /**
+     * Set a WindowClosedCallback for a ModalWindow instance.
+     *
+     * @param window window
+     * @param container container
+     */
+    protected void setWindowClosedCallback(final ModalWindow window, final WebMarkupContainer container) {
+
+        window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
+
+            private static final long serialVersionUID = 8804221891699487139L;
+
+            @Override
+            public void onClose(final AjaxRequestTarget target) {
+                target.add(container);
+                if (isModalResult()) {
+                    info(getString(Constants.OPERATION_SUCCEEDED));
+                    feedbackPanel.refresh(target);
+                    setModalResult(false);
+                }
+            }
+        });
+    }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java
new file mode 100644
index 0000000..01cdad4
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.pages;
+
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+public class Dashboard extends BasePage {
+
+    private static final long serialVersionUID = -1100228004207271270L;
+
+    public Dashboard(final PageParameters parameters) {
+        super(parameters);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java
deleted file mode 100644
index 6fa6b16..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/HomePage.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.pages;
-
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-
-public class HomePage extends BasePage {
-
-    private static final long serialVersionUID = -1100228004207271270L;
-
-    public HomePage(final PageParameters parameters) {
-        super(parameters);
-
-        add(new Label("username", SyncopeConsoleSession.get().getSelfTO().getUsername()));
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
new file mode 100644
index 0000000..8421b00
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Login.java
@@ -0,0 +1,160 @@
+/*
+ * 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.pages;
+
+import java.security.AccessControlException;
+import java.util.Locale;
+import org.apache.syncope.client.console.SyncopeConsoleApplication;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.NotificationPanel;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.authentication.IAuthenticationStrategy;
+import org.apache.wicket.authroles.authentication.AuthenticatedWebSession;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.PasswordTextField;
+import org.apache.wicket.markup.html.form.StatelessForm;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.spring.injection.annot.SpringBean;
+
+public class Login extends WebPage {
+
+    private static final long serialVersionUID = 5889157642852559004L;
+
+    @SpringBean(name = "anonymousUser")
+    private String anonymousUser;
+
+    private final NotificationPanel feedbackPanel;
+
+    private final StatelessForm<Void> form;
+
+    private final TextField<String> usernameField;
+
+    private final TextField<String> passwordField;
+
+    private final DropDownChoice<Locale> languageSelect;
+
+    public Login(final PageParameters parameters) {
+        super(parameters);
+        setStatelessHint(true);
+
+        feedbackPanel = new NotificationPanel(Constants.FEEDBACK);
+        add(feedbackPanel);
+
+        form = new StatelessForm<>("login");
+
+        usernameField = new TextField<>("username", new Model<String>());
+        usernameField.setMarkupId("username");
+        form.add(usernameField);
+
+        passwordField = new PasswordTextField("password", new Model<String>());
+        passwordField.setMarkupId("password");
+        form.add(passwordField);
+
+        languageSelect = new LocaleDropDown("language");
+        form.add(languageSelect);
+
+        AjaxButton submitButton = new AjaxButton("submit", new Model<>(getString("submit"))) {
+
+            private static final long serialVersionUID = 429178684321093953L;
+
+            @Override
+            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+                if (anonymousUser.equals(usernameField.getRawInput())) {
+                    throw new AccessControlException("Illegal username");
+                }
+
+                IAuthenticationStrategy strategy = getApplication().getSecuritySettings().getAuthenticationStrategy();
+
+                if (AuthenticatedWebSession.get().signIn(usernameField.getRawInput(), passwordField.getRawInput())) {
+                    // If login has been called because the user was not yet logged in, than continue to the
+                    // original destination, otherwise to the Home page
+                    continueToOriginalDestination();
+                    setResponsePage(getApplication().getHomePage());
+                } else {
+                    error(getString("login-error"));
+                    feedbackPanel.refresh(target);
+                }
+                strategy.remove();
+            }
+        };
+        submitButton.setDefaultFormProcessing(false);
+        form.add(submitButton);
+
+        add(form);
+    }
+
+    /**
+     * Inner class which implements (custom) Locale DropDownChoice component.
+     */
+    private class LocaleDropDown extends DropDownChoice<Locale> {
+
+        private static final long serialVersionUID = 2349382679992357202L;
+
+        private class LocaleRenderer extends ChoiceRenderer<Locale> {
+
+            private static final long serialVersionUID = -3657529581555164741L;
+
+            @Override
+            public String getDisplayValue(final Locale locale) {
+                return locale.getDisplayName(getLocale());
+            }
+        }
+
+        public LocaleDropDown(final String id) {
+            super(id, SyncopeConsoleApplication.SUPPORTED_LOCALES);
+
+            setChoiceRenderer(new LocaleRenderer());
+            setModel(new IModel<Locale>() {
+
+                private static final long serialVersionUID = -6985170095629312963L;
+
+                @Override
+                public Locale getObject() {
+                    return getSession().getLocale();
+                }
+
+                @Override
+                public void setObject(final Locale object) {
+                    getSession().setLocale(object);
+                }
+
+                @Override
+                public void detach() {
+                    // Empty.
+                }
+            });
+
+            // set default value to English
+            getModel().setObject(Locale.ENGLISH);
+        }
+
+        @Override
+        protected boolean wantOnSelectionChangedNotifications() {
+            return true;
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java
new file mode 100644
index 0000000..c3ffb1c
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Logout.java
@@ -0,0 +1,37 @@
+/*
+ * 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.pages;
+
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+
+public class Logout extends WebPage {
+
+    private static final long serialVersionUID = -6497270741904509673L;
+
+    public Logout(final PageParameters parameters) {
+        super(parameters);
+
+        SyncopeConsoleSession.get().invalidate();
+
+        setResponsePage(getApplication().getHomePage());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/pages/SignOut.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/SignOut.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/SignOut.java
deleted file mode 100644
index 1b0ab30..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/SignOut.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.pages;
-
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.request.mapper.parameter.PageParameters;
-
-public class SignOut extends WebPage {
-
-    private static final long serialVersionUID = -6497270741904509673L;
-
-    public SignOut(final PageParameters parameters) {
-        super(parameters);
-
-        SyncopeConsoleSession.get().invalidate();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/6cdae683/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java
index f203d92..5d9c9a0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.client.console.panels;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.commons.Constants;
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.ajax.AjaxEventBehavior;
@@ -32,12 +31,6 @@ public class NotificationPanel extends FeedbackPanel {
 
     private static final long serialVersionUID = 5895940553202128621L;
 
-    private static final String CSS_CLASS = "notificationpanel";
-
-    private static final String DEFAULT_ADDITIONAL_CSS_CLASS = "notificationpanel_top_right";
-
-    private final String additionalCSSClass;
-
     public NotificationPanel(final String id) {
         this(id, null, null);
     }
@@ -58,19 +51,24 @@ public class NotificationPanel extends FeedbackPanel {
             }
         });
 
-        this.additionalCSSClass = StringUtils.isBlank(additionalCSSClass)
-                ? DEFAULT_ADDITIONAL_CSS_CLASS
-                : additionalCSSClass;
-
         // set custom markup id and ouput it, to find the component later on in the js function
         setMarkupId(id);
         setOutputMarkupId(true);
 
-        // Add the additional cssClass and hide the element by default
-        add(new AttributeModifier("class", new Model<>(CSS_CLASS + " " + this.additionalCSSClass)));
+        add(new AttributeModifier("class", new Model<>("alert")));
         add(new AttributeModifier("style", new Model<>("opacity: 0;")));
     }
 
+    private String getCSSClass(final int level) {
+        return level == FeedbackMessage.SUCCESS
+                ? "alert alert-success"
+                : level == FeedbackMessage.INFO
+                        ? "alert alert-info"
+                        : level == FeedbackMessage.WARNING
+                                ? "alert alert-warning"
+                                : "alert alert-danger";
+    }
+
     /**
      * Method to refresh the notification panel.
      *
@@ -92,12 +90,8 @@ public class NotificationPanel extends FeedbackPanel {
                 highestFeedbackLevel = FeedbackMessage.ERROR;
             }
 
-            // add the css classes to the notification panel, 
-            // including the border css which represents the highest level of feedback
-            add(new AttributeModifier("class",
-                    new Model<>(CSS_CLASS
-                            + " " + additionalCSSClass
-                            + " notificationpanel_border_" + highestFeedbackLevel)));
+            // add the css classes to the notification panel,
+            add(new AttributeModifier("class", new Model<>(getCSSClass(highestFeedbackLevel))));
 
             // refresh the panel and call the js function with the panel markup id 
             // and the total count of messages
@@ -114,6 +108,6 @@ public class NotificationPanel extends FeedbackPanel {
 
     @Override
     protected String getCSSClass(final FeedbackMessage message) {
-        return "notificationpanel_row_" + message.getLevelAsString();
+        return "notificationpanel_row";
     }
 }