Web UI Branding support 21/121/1
authorMadhu Venugopal <vmadhu@cisco.com>
Sat, 6 Apr 2013 01:38:08 +0000 (18:38 -0700)
committerMadhu Venugopal <vmadhu@cisco.com>
Sat, 6 Apr 2013 01:38:08 +0000 (18:38 -0700)
This fix provides an extensible branding support with the help of OSGi Fragment.
Also included a sample branding fragment which can be used to create custom brands.

Change-Id: Ifccf87ba6a57bf2d0a6da07b6a1809994d7fdf1f
Signed-off-by: Madhu Venugopal <vmadhu@cisco.com>
opendaylight/web/brandfragment/pom.xml [new file with mode: 0644]
opendaylight/web/brandfragment/src/main/resources/WEB-INF/jsp/customlogin.jsp [new file with mode: 0644]
opendaylight/web/brandfragment/src/main/resources/WEB-INF/jsp/custommain.jsp [new file with mode: 0644]
opendaylight/web/brandfragment/src/main/resources/css/customlogin.less [new file with mode: 0644]
opendaylight/web/brandfragment/src/main/resources/css/custommain.less [new file with mode: 0644]
opendaylight/web/brandfragment/src/main/resources/img/logo.png [new file with mode: 0644]
opendaylight/web/root/src/main/resources/WEB-INF/jsp/login.jsp
opendaylight/web/root/src/main/resources/WEB-INF/jsp/main.jsp

diff --git a/opendaylight/web/brandfragment/pom.xml b/opendaylight/web/brandfragment/pom.xml
new file mode 100644 (file)
index 0000000..43f8c53
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.opendaylight.controller</groupId>
+        <artifactId>commons.opendaylight</artifactId>
+        <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../../commons/opendaylight</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.controller</groupId>
+    <artifactId>web.brandfragment</artifactId>
+    <version>0.4.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.3.6</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Fragment-Host>org.opendaylight.controller.web</Fragment-Host>
+                        <Web-ContextPath>/</Web-ContextPath>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/opendaylight/web/brandfragment/src/main/resources/WEB-INF/jsp/customlogin.jsp b/opendaylight/web/brandfragment/src/main/resources/WEB-INF/jsp/customlogin.jsp
new file mode 100644 (file)
index 0000000..f2adf1f
--- /dev/null
@@ -0,0 +1,3 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<c:set var="title" value="Open Daylight - Login" scope="application"/>
+<link rel="stylesheet/less" type="text/css" href="/css/customlogin.less">
diff --git a/opendaylight/web/brandfragment/src/main/resources/WEB-INF/jsp/custommain.jsp b/opendaylight/web/brandfragment/src/main/resources/WEB-INF/jsp/custommain.jsp
new file mode 100644 (file)
index 0000000..f079c82
--- /dev/null
@@ -0,0 +1,4 @@
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<c:set var="version" value="Version 0.1" scope="application"/>
+<c:set var="name" value="Open Daylight" scope="application"/>
+<link rel="stylesheet/less" type="text/css" href="/css/custommain.less">
diff --git a/opendaylight/web/brandfragment/src/main/resources/css/customlogin.less b/opendaylight/web/brandfragment/src/main/resources/css/customlogin.less
new file mode 100644 (file)
index 0000000..cdaba23
--- /dev/null
@@ -0,0 +1,53 @@
+.reset {
+       padding: 0;
+       margin: 0;
+}
+
+html , body {
+       .reset;
+       height: 100%;
+       width: 100%;
+       background-color: #eee;
+}
+
+html {
+       display: table;
+}
+
+body {
+       display: table-cell;
+       vertical-align: middle;
+       padding-bottom: 10%;
+}
+
+.container {
+       width: 650px;
+       .content {
+               padding: 25px;
+               background-color: #fff;
+               -webkit-border-radius: 10px;
+               -moz-border-radius: 10px;
+               border-radius: 10px;
+               -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
+               -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
+               box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
+               text-align: center;
+               .login-form {
+                       #logo {
+                               background-repeat: no-repeat;
+                               background-position: center;
+                               background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAADQCAMAAADGQmMsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBQ0I5NEY2RjhBM0QxMUUyOUMzMUNFMzQ4NjM5NUNFRiIgeG1wTU06RG9jdW1lbnR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si/Rmg9dCmY2O1+Z4O0CH4mUq7a68aBboqi5Y/VoT4KOymdo7NwIdOTvGLmZDiJ3oT8h+bdl89iPYbOJ+2U/Ke/BpxGh1/LTbdCwN+S+4Qc/ral8vtrODUFHw2y2HlWD3ISeHCsd/+/ODbNMZlYMvGwInxveeNCtX6grZcX1li9X5M95QAKjdXK9vTwnyAh0lGyxdZOBRTQodLMmpjx4j6U/MVlmav0w3imIr3wlRmOJOtBHuQQdJUsJlVFr1J65uJZShSR7gTwAOkqdr7Rzg9Attm6qQYagyxNKC5cl10wutSCfIe+P18YLnKo23912/wZbegEXOprV07JUQtpBZxuzrDxdiibcKQ+m8gToKDp3sDKdzBh0lBwfFokMQg9s7mPTkqWD7DO76Qo33jjaqSsXnUeagLvpCvT4z3y0Kk17hQcdoT7WW8uOXeO7enWm7+R062ok7VORp0FHkSoHp0HoKLkGGYXOcNYHqFqGRF7gk0MBtGqZ5QJ0tuxLGjDXnAmO1c46Z6tiJj0DulpGoRvUbE24dVRiej+1J13KJhsoPlGZOiwlkZH9Ytcn3FjtQsfBrEY/eG3pEXlObldfdYli7foYTi1lLplAm44ozg4PhV6QmqlQ74Os7low3aNbJWVmKqqH8MxM7tMvy+QossBxMCcF792X1sYuSSxN/Cp2VSZjwbjZvTOjud+SPsg5q/QQpnoRdNCdEkAH6HdUfXjQ+8Fz91jo04o48oXn7rHQQQAdBNBBAB0E0EEAHQTQQQAdBNBBAB0E0EEAHaCDADoIoIMAOgiggwA6CKCDADoIoIMAOgiggwA6CKCDADoIoIMAOgigA3QQQAcBdBBABwF0EEAHAXQQQAcBdBBABwF0EEAHAXQQQAcBdBBABwF0gA4C6CCADgLoIIAOAuig+13/FGAApyIqjoQlf2EAAAAASUVORK5CYII=');
+                               width: 400px;
+                               height: 175px;
+                               margin: 0 auto 20px;
+                       }
+                       .icon-login {
+                               width: 20px;
+                               height: 16px;
+                               background-position: left center;
+                               background-repeat: no-repeat;
+                               background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAc5JREFUeNpi3NLKAAKMQBwNxP5AbM0AAUeBeCMQLwXi/95V/xmwARao5nphGeN6KTUPBlF5S7DE64fHQ57d2hHy9slZFSC3EWQILgOiQZqVjRMY3r+4zHBqYx5YQlLVhQEkBjIcaMgdIL0EmwFMIGeDbAZpvn1yVtGXd/cEQRjEBomB5KBeY8BlgDXI2c9v7wHx53vnnf0AwiA2SAzqJWt8BlAEQAYcBQYY2M9AkLh1krEACIPYIDGQHDRGcBqwERjaDIISugyq5ml9PEJK70EYxAaJgeTYWTRDcBnACEwHuKIRrPnLi28MipZBDF+f7WJQcpoAUsvAI2qFYgDOhASy+cXDzwx6dpIgzQz39hWADQHRIKAXfoqB8f///zgD6NJKMxD1/9Kh5yiGQC0EG0AwFm6f/sAI0gwyBOoCBuRUSVQ0ggyRkOfFaggLIc2qpgIM7558/K/jW8Lw7PwMsCEMDAUMYloxDIcm6U7FGwYwcKBX/b+0liqDoHIQw4UNPQyggJVTF2Cwy7vMyOgizMj4W4iDkZGZhYmdmZGBi/E/Cws7IzMDCwvLPyZGlvdf/nK+//qHuy9L6gbIsNTex/oT8xWKvCuug3Ldd4AAAwBj/b+B1P2YnAAAAABJRU5ErkJggg==');
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/opendaylight/web/brandfragment/src/main/resources/css/custommain.less b/opendaylight/web/brandfragment/src/main/resources/css/custommain.less
new file mode 100644 (file)
index 0000000..cb6fbc5
--- /dev/null
@@ -0,0 +1,260 @@
+// properties
+@mainTop: 43px;
+@mainBottom: 41px;
+
+@minWidth: 640px;
+@minHeight: 480px;
+
+@topologyOffset: -4px; // ensure calibration
+
+// mixins
+.dash-size (@width, @height) {
+       width: @width;
+       height: @height;
+}
+.position (@type, @top, @right, @bottom, @left) {
+       position: @type;
+       top: @top;
+       right: @right;
+       bottom: @bottom;
+       left: @left;
+}
+.dash-position (@top, @right, @bottom, @left) {
+       .position(absolute, @top, @right, @bottom, @left);
+}
+.icon {
+       width: 22px;
+       height: 16px;
+       background-position: left center;
+       background-repeat: no-repeat;
+}
+.dashlet-elements {
+       width: 98%;
+       margin: 5px auto;
+}
+
+// header
+#menu {
+       .navbar-inner {
+               .brand {
+                       font-size: 1.4em;
+                       font-variant: small-caps;
+                       margin: 0 12px;
+                       padding: 10px 0 10px 45px;
+                       background-image: url('../img/logo.png');
+                       background-position: left center;
+                       background-repeat: no-repeat;
+               }
+               ul {
+                       margin-top: 10px;
+                       border-bottom: transparent;
+                       li {
+                               a {
+                                       padding: 5px 15px;
+                                       &:hover {
+                                               border-color: transparent;
+                                       }
+                               }
+                       }
+                       .active {
+                               a {
+                                       border-radius: 1px;
+                                       background: #f6f6f6;
+                                       &:hover {
+                                               border-top: 1px solid #ddd;
+                                               border-right: 1px solid #ddd;
+                                               border-left: 1px solid #ddd;
+                                       }
+                               }
+                       }
+               }
+               #toolbar {
+                       position: absolute;
+                       right: 10px;
+                       .dropdown-menu {
+                               right: 0;
+                               left: auto;
+                               min-width: 120px;
+                       }
+                       .icon-user {
+                               .icon;
+                               background-image: url('../img/user_0020_16.png');
+                       }
+                       .icon-users {
+                               .icon;
+                               background-image: url('../img/user_group_0107_16.png');
+                       }
+                       .icon-save {
+                               .icon;
+                               background-image: url('../img/save_as_0106_16.png');
+                       }
+                       .icon-logout {
+                               .icon;
+                               background-image: url('../img/open_1054_16.png');
+                       }
+               }
+       }
+}
+
+// footer
+#footer {
+       #alert {
+               margin: 0;
+               p {
+                       padding: 0;
+                       margin: 0;
+               }
+       }
+}
+
+// main
+#main {
+       position: fixed;
+       top: @mainTop;
+       right: 0;
+       bottom: @mainBottom;
+       left: 0;
+       min-width: @minWidth;
+       min-height: @minHeight;
+
+       // topology
+       #topology {
+               position: absolute;
+               top: @topologyOffset;
+               right: 0;
+               bottom: @topologyOffset;
+               left: 0;
+               background: #ddd;
+       }
+
+       // left
+       #left {
+               .dash-size(30%, 100%);
+               float: left;
+
+               #left-top {
+                       .dash-size(100%, 60%);
+
+                       .dash { 
+                               .dash-position(5px, 5px, 5px, 5px);
+                       }
+               }
+
+               #left-bottom {
+                       .dash-size(100%, 40%);
+
+                       .dash {
+                               .dash-position(0, 5px, 5px, 5px);
+                       }
+               }
+       }
+
+       // right
+       #right {
+               .dash-size(70%, 100%);
+               float: right;
+
+               #right-top {
+                       .dash-size(100%, 60%);
+
+                       .dash {
+                               .dash-position(5px, 5px, 5px, 0);
+                       }
+               }
+
+               #right-bottom {
+                       .dash-size(100%, 40%);
+
+                       .dash {
+                               .dash-position(0, 5px, 5px, 0);
+                       }
+               }
+       }
+
+       #left-top, #left-bottom,
+       #right-top, #right-bottom {
+               position: relative;
+       }
+
+       // dashentries
+       .dash {
+               border-radius: 1px;
+               background: #fff;
+               border: 1px solid #ddd;
+
+               .nav {
+                       padding: 2px;
+                       padding-bottom: 0;
+                       margin: 0;
+               }
+
+               .nav-tabs {
+                       background: #eee;
+                       li {
+                               a {
+                                       background: #ddd;
+                                       padding: 4px 8px;
+                                       margin-right: 3px;
+                                       border-radius: 1px;
+                                       &:hover {
+                                               border-color: transparent;
+                                       }
+                               }
+                       }
+                       .active {
+                               a {
+                                       background: #fff;
+                                       border-radius: 1px;
+                                       &:hover {
+                                               border-top: 1px solid #ddd;
+                                               border-left: 1px solid #ddd;
+                                               border-right: 1px solid #ddd;
+                                       }
+                               }
+                       }
+               }
+
+               .dashlet {
+                       overflow: auto;
+                       .dash-position(45px,0,0,0);
+
+                       h4 {
+                               .dashlet-elements;
+                       }
+
+                       p {
+                               .dashlet-elements;
+                       }
+
+                       table {
+                               .dashlet-elements;
+                       }
+                       
+                       .btn-group {
+                               margin: 5px;
+                       }
+                       
+                       .none {
+                               margin: 0 auto;
+                               padding-top: 128px;
+                               background-position: center;
+                               background-repeat: no-repeat;
+                               background-image: url('../img/alert_unreachable_2008_128.png');
+                               text-align: center;
+                               p {
+                                       cursor: default;
+                               }
+                       }
+               }
+       }
+
+       // defaults for visual topology
+       #right-top .dash {
+               background: #ddd;
+               overflow: hidden;
+       }
+}
+
+.table-cursor tr:hover {
+       cursor: pointer;
+}
diff --git a/opendaylight/web/brandfragment/src/main/resources/img/logo.png b/opendaylight/web/brandfragment/src/main/resources/img/logo.png
new file mode 100644 (file)
index 0000000..46c02e2
Binary files /dev/null and b/opendaylight/web/brandfragment/src/main/resources/img/logo.png differ
index a343d98..431f23a 100644 (file)
@@ -1,18 +1,27 @@
 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ page import="java.net.URL" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 
 <!DOCTYPE html>
 <html>
   <head>
     <meta charset="utf-8">
-    <title>OpenDaylight - Login</title>
 
     <!-- Bootstrap CSS - 1 -->
        <link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
-       
+
        <!-- Login CSS - 2 -->
        <link rel="stylesheet/less" type="text/css" href="/css/login.less">
-       
+
+<c:set var="title" value="OpenDaylight-login" scope="application"/>
+<%
+    String filePath = "/WEB-INF/jsp/customlogin.jsp"; 
+       URL fileURL = pageContext.getServletContext().getResource(filePath);
+       if(fileURL!=null) {
+%>
+         <jsp:include page="<%=filePath%>" flush="true"/>
+<% } %>
+       <title>${title}</title>
        <!-- Bootstrap JS - 1 -->
        <script src="/js/bootstrap.min.js"></script>
        
@@ -25,7 +34,7 @@
        <script src="/js/less-1.3.3.min.js"></script>
 </head>
 <body>
-        <form action="<c:url value='j_spring_security_check' />" id="form" method="post">
+  <form action="<c:url value='j_spring_security_check' />" id="form" method="post">
 
   <div class="container">
     <div class="content">
index f217212..ceb462d 100644 (file)
@@ -5,12 +5,13 @@
  - terms of the Eclipse Public License v1.0 which accompanies this distribution, 
  - and is available at http://www.eclipse.org/legal/epl-v10.html
 --%>
+<%@ page import="java.net.URL" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 
 <!DOCTYPE html>
 <html>
 
 <head>
-       <title>OpenDaylight</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
        <!-- Bootstrap CSS - 1 -->
        <!-- Core CSS - 2 -->
        <link rel="stylesheet/less" type="text/css" href="/css/one.less">
 
+<c:set var="version" value="Version 0.1" scope="application"/>
+<c:set var="name" value="OpenDaylight" scope="application"/>
+
+<%     
+    String filePath = "/WEB-INF/jsp/custommain.jsp"; 
+    URL fileURL = pageContext.getServletContext().getResource(filePath);
+    if(fileURL!=null) {
+%>
+         <jsp:include page="<%=filePath%>" flush="true"/>
+<% } %>
+
+    <title>${name}</title>
        <!-- jQuery - 1 -->
        <script src="/js/jquery-1.9.1.min.js"></script>
        
@@ -42,7 +55,7 @@
 <div id="menu" class="navbar navbar-fixed-top">
        <div class="navbar-inner row-fluid">
                <div class="span10">
-                       <a class="brand" href="/" title="Version 0.1">OpenDaylight</a> 
+                       <a class="brand" href="/" title="${version}">${name}</a> 
                        <ul class="nav nav-tabs">
                        </ul>
                </div>