Thomas Vachuska

Enhanced look and feel of the GUI navigation pane to be consistent with the mast…

…-head look and feel. Also enabled the dynamic content generation in web.xml by default; accessible via onos/ui/main.html URL.

Change-Id: I9f3ad321ff3eadc4092bd131f30568ec7c7b6f9d
...@@ -41,7 +41,7 @@ public class AbstractInjectionResource extends BaseResource { ...@@ -41,7 +41,7 @@ public class AbstractInjectionResource extends BaseResource {
41 */ 41 */
42 protected int split(String string, int start, String stopPattern) { 42 protected int split(String string, int start, String stopPattern) {
43 int i = stopPattern != null ? string.indexOf(stopPattern, start) : string.length(); 43 int i = stopPattern != null ? string.indexOf(stopPattern, start) : string.length();
44 - checkArgument(i > 0, "Unable to locate stop pattern %s", stopPattern); 44 + checkArgument(i >= 0, "Unable to locate pattern %s", stopPattern);
45 return i + (stopPattern != null ? stopPattern.length() : 0); 45 return i + (stopPattern != null ? stopPattern.length() : 0);
46 } 46 }
47 47
......
...@@ -45,7 +45,7 @@ public class MainNavResource extends AbstractInjectionResource { ...@@ -45,7 +45,7 @@ public class MainNavResource extends AbstractInjectionResource {
45 45
46 46
47 private static final String NAV_FORMAT = 47 private static final String NAV_FORMAT =
48 - " <li> <a ng-click=\"navCtrl.hideNav()\" href=\"#/%s\">%s</a></li>"; 48 + "<a ng-click=\"navCtrl.hideNav()\" href=\"#/%s\">%s</a>\n";
49 49
50 @GET 50 @GET
51 @Produces(MediaType.TEXT_HTML) 51 @Produces(MediaType.TEXT_HTML)
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
50 --> 50 -->
51 51
52 <!-- 52 <!--
53 + -->
53 <servlet> 54 <servlet>
54 <servlet-name>Index Page</servlet-name> 55 <servlet-name>Index Page</servlet-name>
55 <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> 56 <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
...@@ -125,7 +126,6 @@ ...@@ -125,7 +126,6 @@
125 <servlet-name>View Module</servlet-name> 126 <servlet-name>View Module</servlet-name>
126 <url-pattern>/app/view/*</url-pattern> 127 <url-pattern>/app/view/*</url-pattern>
127 </servlet-mapping> 128 </servlet-mapping>
128 - -->
129 129
130 <servlet> 130 <servlet>
131 <servlet-name>JAX-RS Service</servlet-name> 131 <servlet-name>JAX-RS Service</servlet-name>
......
...@@ -20,50 +20,45 @@ ...@@ -20,50 +20,45 @@
20 20
21 #nav { 21 #nav {
22 position: absolute; 22 position: absolute;
23 - top: 50px; 23 + top: 45px;
24 - left: 8px; 24 + left: 1px;
25 - width: 160px; 25 + Xwidth: 200px;
26 - height: 100px; 26 + padding: 0px;
27 - padding: 4px;
28 z-index: 3000; 27 z-index: 3000;
29 visibility: hidden; 28 visibility: hidden;
30 } 29 }
31 30
32 .light #nav { 31 .light #nav {
33 - background-color: #ccf; 32 + background-color: #bbb;
34 box-shadow: 0 2px 8px #777; 33 box-shadow: 0 2px 8px #777;
35 } 34 }
36 .dark #nav { 35 .dark #nav {
37 background-color: #444; 36 background-color: #444;
38 - box-shadow: 0 2px 8px #777; 37 + box-shadow: 0 2px 8px #555;
39 } 38 }
40 39
41 -#nav ul li { 40 +#nav a {
42 - font-size: 10pt; 41 + text-decoration: none;
42 + font-size: 14pt;
43 + display: block;
44 + padding: 8px 16px 6px 16px;
43 } 45 }
44 46
45 - 47 +.light #nav a {
46 -#nav h2 { 48 + color: #369;
47 - font-size: 12pt; 49 + border-bottom: solid #ccc 1px;
48 - margin: 0;
49 -}
50 -#nav h3 {
51 - font-size: 8pt;
52 - font-style: italic;
53 - margin: 0;
54 } 50 }
55 51
56 -.light #nav h2, 52 +.dark #nav a {
57 -.light #nav h3 { 53 + color: #eee;
58 - color: black; 54 + border-bottom: solid #333 1px;
59 } 55 }
60 56
61 -.dark #nav h2, 57 +.light #nav a:hover {
62 -.dark #nav h3 { 58 + background-color: #ddd;
63 - color: #ddd;
64 } 59 }
65 60
66 -.dark #nav a { 61 +.dark #nav a:hover {
67 - color: #ddd; 62 + background-color: #999;
68 } 63 }
69 64
......
1 -<!-- Navigation partial HTML --> 1 +<!-- {INJECTED-VIEW-NAV-START} -->
2 -<h2>Navigation</h2> 2 +<a ng-click="navCtrl.hideNav()" href="#/sample">Sample</a>
3 -<h3>(Note - this is temporary)</h3> 3 +<a ng-click="navCtrl.hideNav()" href="#/topo">Network Topology</a>
4 - 4 +<a ng-click="navCtrl.hideNav()" href="#/device">Device List</a>
5 -<ul> 5 +<!-- {INJECTED-VIEW-NAV-END} -->
6 - <!-- {INJECTED-VIEW-NAV-START} -->
7 - <li> <a ng-click="navCtrl.hideNav()" href="#/sample">Sample View</a></li>
8 - <li> <a ng-click="navCtrl.hideNav()" href="#/topo">Topology View</a></li>
9 - <li> <a ng-click="navCtrl.hideNav()" href="#/device">Device View</a></li>
10 - <!-- {INJECTED-VIEW-NAV-END} -->
11 -</ul>
......