Thomas Vachuska

Promoting new GUI resources into place; still hidden behind legacy redirect though.

Change-Id: If1f25cd7297b93374f492474eb321da16e9995ec
...@@ -63,7 +63,13 @@ ...@@ -63,7 +63,13 @@
63 <configuration> 63 <configuration>
64 <instructions> 64 <instructions>
65 <_wab>src/main/webapp/</_wab> 65 <_wab>src/main/webapp/</_wab>
66 - <Include-Resource>src/main/webapp/app/view,{maven-resources}</Include-Resource> 66 + <Include-Resource>
67 + src/main/webapp/index.html,
68 + src/main/webapp/nav.html,
69 + src/main/webapp/onos.js,
70 + src/main/webapp/app/view,
71 + {maven-resources}
72 + </Include-Resource>
67 <Bundle-SymbolicName> 73 <Bundle-SymbolicName>
68 ${project.groupId}.${project.artifactId} 74 ${project.groupId}.${project.artifactId}
69 </Bundle-SymbolicName> 75 </Bundle-SymbolicName>
......
...@@ -34,10 +34,10 @@ import static com.google.common.io.ByteStreams.toByteArray; ...@@ -34,10 +34,10 @@ import static com.google.common.io.ByteStreams.toByteArray;
34 /** 34 /**
35 * Resource for serving the dynamically composed index.html. 35 * Resource for serving the dynamically composed index.html.
36 */ 36 */
37 -@Path("/") 37 +@Path("/index.html")
38 public class MainIndexResource extends AbstractInjectionResource { 38 public class MainIndexResource extends AbstractInjectionResource {
39 39
40 - private static final String INDEX = "templates/index-template.html"; 40 + private static final String INDEX = "index.html";
41 41
42 private static final String INJECT_CSS_START = "<!-- {INJECTED-STYLESHEETS-START} -->"; 42 private static final String INJECT_CSS_START = "<!-- {INJECTED-STYLESHEETS-START} -->";
43 private static final String INJECT_CSS_END = "<!-- {INJECTED-STYLESHEETS-END} -->"; 43 private static final String INJECT_CSS_END = "<!-- {INJECTED-STYLESHEETS-END} -->";
......
1 +/*
2 + * Copyright 2015 Open Networking Laboratory
3 + *
4 + * Licensed under the Apache License, Version 2.0 (the "License");
5 + * you may not use this file except in compliance with the License.
6 + * You may obtain a copy of the License at
7 + *
8 + * http://www.apache.org/licenses/LICENSE-2.0
9 + *
10 + * Unless required by applicable law or agreed to in writing, software
11 + * distributed under the License is distributed on an "AS IS" BASIS,
12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 + * See the License for the specific language governing permissions and
14 + * limitations under the License.
15 + */
16 +package org.onosproject.ui.impl;
17 +
18 +import org.onosproject.ui.UiExtension;
19 +import org.onosproject.ui.UiExtensionService;
20 +import org.onosproject.ui.UiView;
21 +
22 +import javax.ws.rs.GET;
23 +import javax.ws.rs.Path;
24 +import javax.ws.rs.Produces;
25 +import javax.ws.rs.core.Response;
26 +import java.io.ByteArrayInputStream;
27 +import java.io.IOException;
28 +import java.io.InputStream;
29 +import java.io.SequenceInputStream;
30 +
31 +import static com.google.common.collect.ImmutableList.of;
32 +import static com.google.common.io.ByteStreams.toByteArray;
33 +import static org.onosproject.ui.impl.MainViewResource.SCRIPT;
34 +
35 +/**
36 + * Resource for serving the dynamically composed onos.js.
37 + */
38 +@Path("/onos.js")
39 +public class MainModuleResource extends AbstractInjectionResource {
40 +
41 + private static final String MAIN_JS = "onos.js";
42 +
43 + private static final String INJECT_VIEW_IDS_START = "// {INJECTED-VIEW-IDS-START}";
44 + private static final String INJECT_VIEW_IDS_END = "// {INJECTED-VIEW-IDS-END}";
45 +
46 + @GET
47 + @Produces(SCRIPT)
48 + public Response getMainModule() throws IOException {
49 + UiExtensionService service = get(UiExtensionService.class);
50 + InputStream jsTemplate = getClass().getClassLoader().getResourceAsStream(MAIN_JS);
51 + String js = new String(toByteArray(jsTemplate));
52 +
53 + int p1s = split(js, 0, INJECT_VIEW_IDS_START);
54 + int p1e = split(js, 0, INJECT_VIEW_IDS_END);
55 + int p2s = split(js, p1e, null);
56 +
57 + StreamEnumeration streams =
58 + new StreamEnumeration(of(stream(js, 0, p1s),
59 + includeViewIds(service),
60 + stream(js, p1e, p2s)));
61 +
62 + return Response.ok(new SequenceInputStream(streams)).build();
63 + }
64 +
65 + // Produces an input stream including view id injections from all extensions.
66 + private InputStream includeViewIds(UiExtensionService service) {
67 + StringBuilder sb = new StringBuilder("\n");
68 + for (UiExtension extension : service.getExtensions()) {
69 + for (UiView view : extension.views()) {
70 + sb.append(" '").append(view.id()).append("',");
71 + }
72 + }
73 + return new ByteArrayInputStream(sb.toString().getBytes());
74 + }
75 +
76 +}
...@@ -31,19 +31,14 @@ import java.io.SequenceInputStream; ...@@ -31,19 +31,14 @@ import java.io.SequenceInputStream;
31 31
32 import static com.google.common.collect.ImmutableList.of; 32 import static com.google.common.collect.ImmutableList.of;
33 import static com.google.common.io.ByteStreams.toByteArray; 33 import static com.google.common.io.ByteStreams.toByteArray;
34 -import static org.onosproject.ui.impl.MainViewResource.SCRIPT;
35 34
36 /** 35 /**
37 - * Resource for serving the dynamically composed onos.js. 36 + * Resource for serving the dynamically composed nav.html.
38 */ 37 */
39 -@Path("/") 38 +@Path("/nav/nav.html")
40 -public class MainExtResource extends AbstractInjectionResource { 39 +public class MainNavResource extends AbstractInjectionResource {
41 40
42 - private static final String MAIN_JS = "templates/onos-template.js"; 41 + private static final String NAV_HTML = "nav.html";
43 - private static final String NAV_HTML = "templates/nav-template.html";
44 -
45 - private static final String INJECT_VIEW_IDS_START = "// {INJECTED-VIEW-IDS-START}";
46 - private static final String INJECT_VIEW_IDS_END = "// {INJECTED-VIEW-IDS-END}";
47 42
48 private static final String INJECT_VIEW_ITEMS_START = "<!-- {INJECTED-VIEW-NAV-START} -->"; 43 private static final String INJECT_VIEW_ITEMS_START = "<!-- {INJECTED-VIEW-NAV-START} -->";
49 private static final String INJECT_VIEW_ITEMS_END = "<!-- {INJECTED-VIEW-NAV-END} -->"; 44 private static final String INJECT_VIEW_ITEMS_END = "<!-- {INJECTED-VIEW-NAV-END} -->";
...@@ -52,38 +47,6 @@ public class MainExtResource extends AbstractInjectionResource { ...@@ -52,38 +47,6 @@ public class MainExtResource extends AbstractInjectionResource {
52 private static final String NAV_FORMAT = 47 private static final String NAV_FORMAT =
53 " <li> <a ng-click=\"navCtrl.hideNav()\" href=\"#/%s\">%s</a></li>"; 48 " <li> <a ng-click=\"navCtrl.hideNav()\" href=\"#/%s\">%s</a></li>";
54 49
55 - @Path("/onos.js")
56 - @GET
57 - @Produces(SCRIPT)
58 - public Response getMainModule() throws IOException {
59 - UiExtensionService service = get(UiExtensionService.class);
60 - InputStream jsTemplate = getClass().getClassLoader().getResourceAsStream(MAIN_JS);
61 - String js = new String(toByteArray(jsTemplate));
62 -
63 - int p1s = split(js, 0, INJECT_VIEW_IDS_START);
64 - int p1e = split(js, 0, INJECT_VIEW_IDS_END);
65 - int p2s = split(js, p1e, null);
66 -
67 - StreamEnumeration streams =
68 - new StreamEnumeration(of(stream(js, 0, p1s),
69 - includeViewIds(service),
70 - stream(js, p1e, p2s)));
71 -
72 - return Response.ok(new SequenceInputStream(streams)).build();
73 - }
74 -
75 - // Produces an input stream including view id injections from all extensions.
76 - private InputStream includeViewIds(UiExtensionService service) {
77 - StringBuilder sb = new StringBuilder("\n");
78 - for (UiExtension extension : service.getExtensions()) {
79 - for (UiView view : extension.views()) {
80 - sb.append(" '").append(view.id()).append("',");
81 - }
82 - }
83 - return new ByteArrayInputStream(sb.toString().getBytes());
84 - }
85 -
86 - @Path("/nav/nav.html")
87 @GET 50 @GET
88 @Produces(MediaType.TEXT_HTML) 51 @Produces(MediaType.TEXT_HTML)
89 public Response getNavigation() throws IOException { 52 public Response getNavigation() throws IOException {
......
...@@ -78,14 +78,33 @@ ...@@ -78,14 +78,33 @@
78 </init-param> 78 </init-param>
79 <init-param> 79 <init-param>
80 <param-name>com.sun.jersey.config.property.classnames</param-name> 80 <param-name>com.sun.jersey.config.property.classnames</param-name>
81 - <param-value>org.onosproject.ui.impl.MainExtResource</param-value> 81 + <param-value>org.onosproject.ui.impl.MainModuleResource</param-value>
82 </init-param> 82 </init-param>
83 <load-on-startup>1</load-on-startup> 83 <load-on-startup>1</load-on-startup>
84 </servlet> 84 </servlet>
85 85
86 <servlet-mapping> 86 <servlet-mapping>
87 <servlet-name>Main Module</servlet-name> 87 <servlet-name>Main Module</servlet-name>
88 - <url-pattern>/dyn/*</url-pattern> 88 + <url-pattern>/onos.js</url-pattern>
89 + </servlet-mapping>
90 +
91 + <servlet>
92 + <servlet-name>Nav Module</servlet-name>
93 + <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
94 + <init-param>
95 + <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
96 + <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value>
97 + </init-param>
98 + <init-param>
99 + <param-name>com.sun.jersey.config.property.classnames</param-name>
100 + <param-value>org.onosproject.ui.impl.MainNavResource</param-value>
101 + </init-param>
102 + <load-on-startup>1</load-on-startup>
103 + </servlet>
104 +
105 + <servlet-mapping>
106 + <servlet-name>Nav Module</servlet-name>
107 + <url-pattern>/nav.html</url-pattern>
89 </servlet-mapping> 108 </servlet-mapping>
90 109
91 <servlet> 110 <servlet>
......
1 <!-- Masthead partial HTML --> 1 <!-- Masthead partial HTML -->
2 -<img class="logo" src="../data/img/onos-logo.png" ng-click="mastCtrl.toggleNav()"> 2 +<img class="logo" src="data/img/onos-logo.png" ng-click="mastCtrl.toggleNav()">
3 <span class="title">Open Network Operating System</span> 3 <span class="title">Open Network Operating System</span>
4 <div id="mast-right"></div> 4 <div id="mast-right"></div>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
59 59
60 // internal state 60 // internal state
61 var cache = d3.map(), 61 var cache = d3.map(),
62 - bundledUrlPrefix = '../data/map/'; 62 + bundledUrlPrefix = 'data/map/';
63 63
64 function getUrl(id) { 64 function getUrl(id) {
65 if (id[0] === '*') { 65 if (id[0] === '*') {
......
1 -<!DOCTYPE html>
2 -<!--
3 -~ Copyright 2014,2015 Open Networking Laboratory
4 -~
5 -~ Licensed under the Apache License, Version 2.0 (the "License");
6 -~ you may not use this file except in compliance with the License.
7 -~ You may obtain a copy of the License at
8 -~
9 -~ http://www.apache.org/licenses/LICENSE-2.0
10 -~
11 -~ Unless required by applicable law or agreed to in writing, software
12 -~ distributed under the License is distributed on an "AS IS" BASIS,
13 -~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 -~ See the License for the specific language governing permissions and
15 -~ limitations under the License.
16 --->
17 -<html>
18 -<head>
19 - <meta charset="utf-8">
20 - <link rel="shortcut icon" href="../data/img/onos-logo.png">
21 - <title>ONOS Angular</title>
22 -
23 - <!-- Third party library code included here -->
24 - <!--TODO: use minified versions, once debugging is complete -->
25 - <script src="../tp/angular.js"></script>
26 - <script src="../tp/angular-route.js"></script>
27 -
28 - <script src="../tp/d3.js"></script>
29 - <script src="../tp/topojson.v1.min.js"></script>
30 -
31 - <!-- ONOS UI Framework included here -->
32 - <!-- TODO: use a single catenated-minified file here -->
33 - <script src="onos.js"></script>
34 - <script src="directives.js"></script>
35 -
36 - <script src="fw/util/util.js"></script>
37 - <script src="fw/util/fn.js"></script>
38 - <script src="fw/util/random.js"></script>
39 - <script src="fw/util/theme.js"></script>
40 - <script src="fw/util/keys.js"></script>
41 -
42 - <script src="fw/mast/mast.js"></script>
43 - <script src="fw/nav/nav.js"></script>
44 -
45 - <script src="fw/svg/svg.js"></script>
46 - <script src="fw/svg/glyph.js"></script>
47 - <script src="fw/svg/icon.js"></script>
48 - <script src="fw/svg/geodata.js"></script>
49 - <script src="fw/svg/map.js"></script>
50 - <script src="fw/svg/zoom.js"></script>
51 - <script src="fw/svg/svgUtil.js"></script>
52 -
53 - <script src="fw/remote/remote.js"></script>
54 - <script src="fw/remote/urlfn.js"></script>
55 - <script src="fw/remote/rest.js"></script>
56 - <script src="fw/remote/websocket.js"></script>
57 - <script src="fw/remote/wsevent.js"></script>
58 -
59 - <script src="fw/widget/widget.js"></script>
60 - <script src="fw/widget/table.js"></script>
61 - <script src="fw/widget/toolbar.js"></script>
62 - <script src="fw/widget/button.js"></script>
63 -
64 - <script src="fw/layer/layer.js"></script>
65 - <script src="fw/layer/panel.js"></script>
66 - <script src="fw/layer/flash.js"></script>
67 - <script src="fw/layer/quickhelp.js"></script>
68 - <script src="fw/layer/veil.js"></script>
69 -
70 - <!-- Framework and library stylesheets included here -->
71 - <!-- TODO: use a single catenated-minified file here -->
72 - <link rel="stylesheet" href="onos.css">
73 - <link rel="stylesheet" href="common.css">
74 - <link rel="stylesheet" href="fw/mast/mast.css">
75 - <link rel="stylesheet" href="fw/svg/glyph.css">
76 - <link rel="stylesheet" href="fw/svg/icon.css">
77 - <link rel="stylesheet" href="fw/layer/panel.css">
78 - <link rel="stylesheet" href="fw/layer/flash.css">
79 - <link rel="stylesheet" href="fw/layer/quickhelp.css">
80 - <link rel="stylesheet" href="fw/layer/veil.css">
81 - <link rel="stylesheet" href="fw/nav/nav.css">
82 -
83 - <!-- This is where contributed javascript will get injected -->
84 - <!-- {INJECTED-JAVASCRIPT-START} -->
85 - <script src="view/sample/sample.js"></script>
86 - <script src="view/topo/topo.js"></script>
87 - <script src="view/topo/topoEvent.js"></script>
88 - <script src="view/topo/topoFilter.js"></script>
89 - <script src="view/topo/topoForce.js"></script>
90 - <script src="view/topo/topoInst.js"></script>
91 - <script src="view/topo/topoModel.js"></script>
92 - <script src="view/topo/topoOblique.js"></script>
93 - <script src="view/topo/topoPanel.js"></script>
94 - <script src="view/topo/topoSelect.js"></script>
95 - <script src="view/topo/topoTraffic.js"></script>
96 - <script src="view/device/device.js"></script>
97 - <!-- {INJECTED-JAVASCRIPT-END} -->
98 -
99 -
100 - <!-- This is where contributed stylesheets will get injected -->
101 - <!-- {INJECTED-STYLESHEETS-START} -->
102 - <link rel="stylesheet" href="view/sample/sample.css">
103 - <link rel="stylesheet" href="view/topo/topo.css">
104 - <link rel="stylesheet" href="view/device/device.css">
105 - <!-- TODO: inject style-sheet refs server-side -->
106 - <!-- {INJECTED-STYLESHEETS-END} -->
107 -
108 -</head>
109 -<body class="light" ng-app="onosApp">
110 -<div id="frame" ng-controller="OnosCtrl as onosCtrl">
111 - <div id="mast"
112 - ng-controller="MastCtrl as mastCtrl"
113 - ng-include="'fw/mast/mast.html'"></div>
114 -
115 - <div id="view" ng-view></div>
116 -
117 - <div id="nav"
118 - ng-controller="NavCtrl as navCtrl"
119 - ng-include="'fw/nav/nav.html'"></div>
120 -
121 - <div id="floatpanels"></div>
122 - <div id="alerts"></div>
123 - <div id="flash"></div>
124 - <div id="quickhelp"></div>
125 - <div id="veil"
126 - resize
127 - ng-style="resizeWithOffset(0, 0)"></div>
128 -</div>
129 -</body>
130 -</html>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <div id="ov-sample"> 2 <div id="ov-sample">
3 <h2> A Sample View </h2> 3 <h2> A Sample View </h2>
4 4
5 - <img class="logo" src="../data/img/onos-logo.png"> 5 + <img class="logo" src="data/img/onos-logo.png">
6 6
7 <p> 7 <p>
8 This is a <i>view</i> distinct from the Topology viewer, 8 This is a <i>view</i> distinct from the Topology viewer,
......
1 +<!DOCTYPE html>
2 +<!--
3 +~ Copyright 2014,2015 Open Networking Laboratory
4 +~
5 +~ Licensed under the Apache License, Version 2.0 (the "License");
6 +~ you may not use this file except in compliance with the License.
7 +~ You may obtain a copy of the License at
8 +~
9 +~ http://www.apache.org/licenses/LICENSE-2.0
10 +~
11 +~ Unless required by applicable law or agreed to in writing, software
12 +~ distributed under the License is distributed on an "AS IS" BASIS,
13 +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 +~ See the License for the specific language governing permissions and
15 +~ limitations under the License.
16 +-->
17 +<html>
18 +<head>
19 + <meta charset="utf-8">
20 + <link rel="shortcut icon" href="data/img/onos-logo.png">
21 + <title>ONOS Angular</title>
22 +
23 + <!-- Third party library code included here -->
24 + <!--TODO: use minified versions, once debugging is complete -->
25 + <script src="tp/angular.js"></script>
26 + <script src="tp/angular-route.js"></script>
27 +
28 + <script src="tp/d3.js"></script>
29 + <script src="tp/topojson.v1.min.js"></script>
30 +
31 + <!-- ONOS UI Framework included here -->
32 + <!-- TODO: use a single catenated-minified file here -->
33 + <script src="onos.js"></script>
34 + <script src="app/directives.js"></script>
35 +
36 + <script src="app/fw/util/util.js"></script>
37 + <script src="app/fw/util/fn.js"></script>
38 + <script src="app/fw/util/random.js"></script>
39 + <script src="app/fw/util/theme.js"></script>
40 + <script src="app/fw/util/keys.js"></script>
41 +
42 + <script src="app/fw/mast/mast.js"></script>
43 + <script src="app/fw/nav/nav.js"></script>
44 +
45 + <script src="app/fw/svg/svg.js"></script>
46 + <script src="app/fw/svg/glyph.js"></script>
47 + <script src="app/fw/svg/icon.js"></script>
48 + <script src="app/fw/svg/geodata.js"></script>
49 + <script src="app/fw/svg/map.js"></script>
50 + <script src="app/fw/svg/zoom.js"></script>
51 + <script src="app/fw/svg/svgUtil.js"></script>
52 +
53 + <script src="app/fw/remote/remote.js"></script>
54 + <script src="app/fw/remote/urlfn.js"></script>
55 + <script src="app/fw/remote/rest.js"></script>
56 + <script src="app/fw/remote/websocket.js"></script>
57 + <script src="app/fw/remote/wsevent.js"></script>
58 +
59 + <script src="app/fw/widget/widget.js"></script>
60 + <script src="app/fw/widget/table.js"></script>
61 + <script src="app/fw/widget/toolbar.js"></script>
62 + <script src="app/fw/widget/button.js"></script>
63 +
64 + <script src="app/fw/layer/layer.js"></script>
65 + <script src="app/fw/layer/panel.js"></script>
66 + <script src="app/fw/layer/flash.js"></script>
67 + <script src="app/fw/layer/quickhelp.js"></script>
68 + <script src="app/fw/layer/veil.js"></script>
69 +
70 + <!-- Framework and library stylesheets included here -->
71 + <!-- TODO: use a single catenated-minified file here -->
72 + <link rel="stylesheet" href="app/onos.css">
73 + <link rel="stylesheet" href="app/common.css">
74 + <link rel="stylesheet" href="app/fw/mast/mast.css">
75 + <link rel="stylesheet" href="app/fw/svg/glyph.css">
76 + <link rel="stylesheet" href="app/fw/svg/icon.css">
77 + <link rel="stylesheet" href="app/fw/layer/panel.css">
78 + <link rel="stylesheet" href="app/fw/layer/flash.css">
79 + <link rel="stylesheet" href="app/fw/layer/quickhelp.css">
80 + <link rel="stylesheet" href="app/fw/layer/veil.css">
81 + <link rel="stylesheet" href="app/fw/nav/nav.css">
82 +
83 + <!-- This is where contributed javascript will get injected -->
84 + <!-- {INJECTED-JAVASCRIPT-START} -->
85 + <script src="app/view/sample/sample.js"></script>
86 + <script src="app/view/topo/topo.js"></script>
87 + <script src="app/view/topo/topoEvent.js"></script>
88 + <script src="app/view/topo/topoFilter.js"></script>
89 + <script src="app/view/topo/topoForce.js"></script>
90 + <script src="app/view/topo/topoInst.js"></script>
91 + <script src="app/view/topo/topoModel.js"></script>
92 + <script src="app/view/topo/topoOblique.js"></script>
93 + <script src="app/view/topo/topoPanel.js"></script>
94 + <script src="app/view/topo/topoSelect.js"></script>
95 + <script src="app/view/topo/topoTraffic.js"></script>
96 + <script src="app/view/device/device.js"></script>
97 + <!-- {INJECTED-JAVASCRIPT-END} -->
98 +
99 +
100 + <!-- This is where contributed stylesheets will get injected -->
101 + <!-- {INJECTED-STYLESHEETS-START} -->
102 + <link rel="stylesheet" href="app/view/sample/sample.css">
103 + <link rel="stylesheet" href="app/view/topo/topo.css">
104 + <link rel="stylesheet" href="app/view/device/device.css">
105 + <!-- TODO: inject style-sheet refs server-side -->
106 + <!-- {INJECTED-STYLESHEETS-END} -->
107 +
108 +</head>
109 +<body class="light" ng-app="onosApp">
110 +<div id="frame" ng-controller="OnosCtrl as onosCtrl">
111 + <div id="mast"
112 + ng-controller="MastCtrl as mastCtrl"
113 + ng-include="'app/fw/mast/mast.html'"></div>
114 +
115 + <div id="view" ng-view></div>
116 +
117 + <div id="nav"
118 + ng-controller="NavCtrl as navCtrl"
119 + ng-include="'nav.html'"></div>
120 +
121 + <div id="floatpanels"></div>
122 + <div id="alerts"></div>
123 + <div id="flash"></div>
124 + <div id="quickhelp"></div>
125 + <div id="veil"
126 + resize
127 + ng-style="resizeWithOffset(0, 0)"></div>
128 +</div>
129 +</body>
130 +</html>
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
3 <h3>(Note - this is temporary)</h3> 3 <h3>(Note - this is temporary)</h3>
4 4
5 <ul> 5 <ul>
6 + <!-- {INJECTED-VIEW-NAV-START} -->
6 <li> <a ng-click="navCtrl.hideNav()" href="#/sample">Sample View</a></li> 7 <li> <a ng-click="navCtrl.hideNav()" href="#/sample">Sample View</a></li>
7 <li> <a ng-click="navCtrl.hideNav()" href="#/topo">Topology View</a></li> 8 <li> <a ng-click="navCtrl.hideNav()" href="#/topo">Topology View</a></li>
8 <li> <a ng-click="navCtrl.hideNav()" href="#/device">Device View</a></li> 9 <li> <a ng-click="navCtrl.hideNav()" href="#/device">Device View</a></li>
10 + <!-- {INJECTED-VIEW-NAV-END} -->
9 </ul> 11 </ul>
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
104 } 104 }
105 105
106 function viewTemplateUrl(vid) { 106 function viewTemplateUrl(vid) {
107 - return 'view/' + vid + '/' + vid + '.html'; 107 + return 'app/view/' + vid + '/' + vid + '.html';
108 } 108 }
109 109
110 // Add routes for each defined view. 110 // Add routes for each defined view.
......
...@@ -51,7 +51,7 @@ describe('factory: fw/svg/geodata.js', function() { ...@@ -51,7 +51,7 @@ describe('factory: fw/svg/geodata.js', function() {
51 promise = gds.fetchTopoData(id); 51 promise = gds.fetchTopoData(id);
52 expect(promise.meta).toBeDefined(); 52 expect(promise.meta).toBeDefined();
53 expect(promise.meta.id).toBe(id); 53 expect(promise.meta.id).toBe(id);
54 - expect(promise.meta.url).toBe('../data/map/foo.json'); 54 + expect(promise.meta.url).toBe('data/map/foo.json');
55 }); 55 });
56 56
57 it('should treat an external id as the url itself', function () { 57 it('should treat an external id as the url itself', function () {
......