Promoting new GUI resources into place; still hidden behind legacy redirect though.
Change-Id: If1f25cd7297b93374f492474eb321da16e9995ec
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/MainIndexResource.java b/web/gui/src/main/java/org/onosproject/ui/impl/MainIndexResource.java
index 5f4158d..dd1ef9a 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/MainIndexResource.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/MainIndexResource.java
@@ -34,10 +34,10 @@
/**
* Resource for serving the dynamically composed index.html.
*/
-@Path("/")
+@Path("/index.html")
public class MainIndexResource extends AbstractInjectionResource {
- private static final String INDEX = "templates/index-template.html";
+ private static final String INDEX = "index.html";
private static final String INJECT_CSS_START = "<!-- {INJECTED-STYLESHEETS-START} -->";
private static final String INJECT_CSS_END = "<!-- {INJECTED-STYLESHEETS-END} -->";
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/MainModuleResource.java b/web/gui/src/main/java/org/onosproject/ui/impl/MainModuleResource.java
new file mode 100644
index 0000000..efa8039
--- /dev/null
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/MainModuleResource.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed 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.onosproject.ui.impl;
+
+import org.onosproject.ui.UiExtension;
+import org.onosproject.ui.UiExtensionService;
+import org.onosproject.ui.UiView;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.SequenceInputStream;
+
+import static com.google.common.collect.ImmutableList.of;
+import static com.google.common.io.ByteStreams.toByteArray;
+import static org.onosproject.ui.impl.MainViewResource.SCRIPT;
+
+/**
+ * Resource for serving the dynamically composed onos.js.
+ */
+@Path("/onos.js")
+public class MainModuleResource extends AbstractInjectionResource {
+
+ private static final String MAIN_JS = "onos.js";
+
+ private static final String INJECT_VIEW_IDS_START = "// {INJECTED-VIEW-IDS-START}";
+ private static final String INJECT_VIEW_IDS_END = "// {INJECTED-VIEW-IDS-END}";
+
+ @GET
+ @Produces(SCRIPT)
+ public Response getMainModule() throws IOException {
+ UiExtensionService service = get(UiExtensionService.class);
+ InputStream jsTemplate = getClass().getClassLoader().getResourceAsStream(MAIN_JS);
+ String js = new String(toByteArray(jsTemplate));
+
+ int p1s = split(js, 0, INJECT_VIEW_IDS_START);
+ int p1e = split(js, 0, INJECT_VIEW_IDS_END);
+ int p2s = split(js, p1e, null);
+
+ StreamEnumeration streams =
+ new StreamEnumeration(of(stream(js, 0, p1s),
+ includeViewIds(service),
+ stream(js, p1e, p2s)));
+
+ return Response.ok(new SequenceInputStream(streams)).build();
+ }
+
+ // Produces an input stream including view id injections from all extensions.
+ private InputStream includeViewIds(UiExtensionService service) {
+ StringBuilder sb = new StringBuilder("\n");
+ for (UiExtension extension : service.getExtensions()) {
+ for (UiView view : extension.views()) {
+ sb.append(" '").append(view.id()).append("',");
+ }
+ }
+ return new ByteArrayInputStream(sb.toString().getBytes());
+ }
+
+}
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/MainExtResource.java b/web/gui/src/main/java/org/onosproject/ui/impl/MainNavResource.java
similarity index 60%
rename from web/gui/src/main/java/org/onosproject/ui/impl/MainExtResource.java
rename to web/gui/src/main/java/org/onosproject/ui/impl/MainNavResource.java
index 1bf3d42..b18c728 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/MainExtResource.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/MainNavResource.java
@@ -31,19 +31,14 @@
import static com.google.common.collect.ImmutableList.of;
import static com.google.common.io.ByteStreams.toByteArray;
-import static org.onosproject.ui.impl.MainViewResource.SCRIPT;
/**
- * Resource for serving the dynamically composed onos.js.
+ * Resource for serving the dynamically composed nav.html.
*/
-@Path("/")
-public class MainExtResource extends AbstractInjectionResource {
+@Path("/nav/nav.html")
+public class MainNavResource extends AbstractInjectionResource {
- private static final String MAIN_JS = "templates/onos-template.js";
- private static final String NAV_HTML = "templates/nav-template.html";
-
- private static final String INJECT_VIEW_IDS_START = "// {INJECTED-VIEW-IDS-START}";
- private static final String INJECT_VIEW_IDS_END = "// {INJECTED-VIEW-IDS-END}";
+ private static final String NAV_HTML = "nav.html";
private static final String INJECT_VIEW_ITEMS_START = "<!-- {INJECTED-VIEW-NAV-START} -->";
private static final String INJECT_VIEW_ITEMS_END = "<!-- {INJECTED-VIEW-NAV-END} -->";
@@ -52,38 +47,6 @@
private static final String NAV_FORMAT =
" <li> <a ng-click=\"navCtrl.hideNav()\" href=\"#/%s\">%s</a></li>";
- @Path("/onos.js")
- @GET
- @Produces(SCRIPT)
- public Response getMainModule() throws IOException {
- UiExtensionService service = get(UiExtensionService.class);
- InputStream jsTemplate = getClass().getClassLoader().getResourceAsStream(MAIN_JS);
- String js = new String(toByteArray(jsTemplate));
-
- int p1s = split(js, 0, INJECT_VIEW_IDS_START);
- int p1e = split(js, 0, INJECT_VIEW_IDS_END);
- int p2s = split(js, p1e, null);
-
- StreamEnumeration streams =
- new StreamEnumeration(of(stream(js, 0, p1s),
- includeViewIds(service),
- stream(js, p1e, p2s)));
-
- return Response.ok(new SequenceInputStream(streams)).build();
- }
-
- // Produces an input stream including view id injections from all extensions.
- private InputStream includeViewIds(UiExtensionService service) {
- StringBuilder sb = new StringBuilder("\n");
- for (UiExtension extension : service.getExtensions()) {
- for (UiView view : extension.views()) {
- sb.append(" '").append(view.id()).append("',");
- }
- }
- return new ByteArrayInputStream(sb.toString().getBytes());
- }
-
- @Path("/nav/nav.html")
@GET
@Produces(MediaType.TEXT_HTML)
public Response getNavigation() throws IOException {
diff --git a/web/gui/src/main/resources/templates/index-template.html b/web/gui/src/main/resources/old-templates/index-template.html
similarity index 100%
rename from web/gui/src/main/resources/templates/index-template.html
rename to web/gui/src/main/resources/old-templates/index-template.html
diff --git a/web/gui/src/main/resources/templates/nav-template.html b/web/gui/src/main/resources/old-templates/nav-template.html
similarity index 100%
rename from web/gui/src/main/resources/templates/nav-template.html
rename to web/gui/src/main/resources/old-templates/nav-template.html
diff --git a/web/gui/src/main/resources/templates/onos-template.js b/web/gui/src/main/resources/old-templates/onos-template.js
similarity index 100%
rename from web/gui/src/main/resources/templates/onos-template.js
rename to web/gui/src/main/resources/old-templates/onos-template.js
diff --git a/web/gui/src/main/webapp/WEB-INF/web.xml b/web/gui/src/main/webapp/WEB-INF/web.xml
index 916797c..f087094 100644
--- a/web/gui/src/main/webapp/WEB-INF/web.xml
+++ b/web/gui/src/main/webapp/WEB-INF/web.xml
@@ -78,14 +78,33 @@
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.classnames</param-name>
- <param-value>org.onosproject.ui.impl.MainExtResource</param-value>
+ <param-value>org.onosproject.ui.impl.MainModuleResource</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Main Module</servlet-name>
- <url-pattern>/dyn/*</url-pattern>
+ <url-pattern>/onos.js</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>Nav Module</servlet-name>
+ <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+ <init-param>
+ <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
+ <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.config.property.classnames</param-name>
+ <param-value>org.onosproject.ui.impl.MainNavResource</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Nav Module</servlet-name>
+ <url-pattern>/nav.html</url-pattern>
</servlet-mapping>
<servlet>
diff --git a/web/gui/src/main/webapp/app/fw/mast/mast.html b/web/gui/src/main/webapp/app/fw/mast/mast.html
index 59c99a3..216b01c 100644
--- a/web/gui/src/main/webapp/app/fw/mast/mast.html
+++ b/web/gui/src/main/webapp/app/fw/mast/mast.html
@@ -1,4 +1,4 @@
<!-- Masthead partial HTML -->
-<img class="logo" src="../data/img/onos-logo.png" ng-click="mastCtrl.toggleNav()">
+<img class="logo" src="data/img/onos-logo.png" ng-click="mastCtrl.toggleNav()">
<span class="title">Open Network Operating System</span>
<div id="mast-right"></div>
diff --git a/web/gui/src/main/webapp/app/fw/svg/geodata.js b/web/gui/src/main/webapp/app/fw/svg/geodata.js
index 63fa4ce..bc6b296 100644
--- a/web/gui/src/main/webapp/app/fw/svg/geodata.js
+++ b/web/gui/src/main/webapp/app/fw/svg/geodata.js
@@ -59,7 +59,7 @@
// internal state
var cache = d3.map(),
- bundledUrlPrefix = '../data/map/';
+ bundledUrlPrefix = 'data/map/';
function getUrl(id) {
if (id[0] === '*') {
diff --git a/web/gui/src/main/webapp/app/index.html b/web/gui/src/main/webapp/app/index.html
deleted file mode 100644
index da46345..0000000
--- a/web/gui/src/main/webapp/app/index.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<!DOCTYPE html>
-<!--
-~ Copyright 2014,2015 Open Networking Laboratory
-~
-~ Licensed 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.
--->
-<html>
-<head>
- <meta charset="utf-8">
- <link rel="shortcut icon" href="../data/img/onos-logo.png">
- <title>ONOS Angular</title>
-
- <!-- Third party library code included here -->
- <!--TODO: use minified versions, once debugging is complete -->
- <script src="../tp/angular.js"></script>
- <script src="../tp/angular-route.js"></script>
-
- <script src="../tp/d3.js"></script>
- <script src="../tp/topojson.v1.min.js"></script>
-
- <!-- ONOS UI Framework included here -->
- <!-- TODO: use a single catenated-minified file here -->
- <script src="onos.js"></script>
- <script src="directives.js"></script>
-
- <script src="fw/util/util.js"></script>
- <script src="fw/util/fn.js"></script>
- <script src="fw/util/random.js"></script>
- <script src="fw/util/theme.js"></script>
- <script src="fw/util/keys.js"></script>
-
- <script src="fw/mast/mast.js"></script>
- <script src="fw/nav/nav.js"></script>
-
- <script src="fw/svg/svg.js"></script>
- <script src="fw/svg/glyph.js"></script>
- <script src="fw/svg/icon.js"></script>
- <script src="fw/svg/geodata.js"></script>
- <script src="fw/svg/map.js"></script>
- <script src="fw/svg/zoom.js"></script>
- <script src="fw/svg/svgUtil.js"></script>
-
- <script src="fw/remote/remote.js"></script>
- <script src="fw/remote/urlfn.js"></script>
- <script src="fw/remote/rest.js"></script>
- <script src="fw/remote/websocket.js"></script>
- <script src="fw/remote/wsevent.js"></script>
-
- <script src="fw/widget/widget.js"></script>
- <script src="fw/widget/table.js"></script>
- <script src="fw/widget/toolbar.js"></script>
- <script src="fw/widget/button.js"></script>
-
- <script src="fw/layer/layer.js"></script>
- <script src="fw/layer/panel.js"></script>
- <script src="fw/layer/flash.js"></script>
- <script src="fw/layer/quickhelp.js"></script>
- <script src="fw/layer/veil.js"></script>
-
- <!-- Framework and library stylesheets included here -->
- <!-- TODO: use a single catenated-minified file here -->
- <link rel="stylesheet" href="onos.css">
- <link rel="stylesheet" href="common.css">
- <link rel="stylesheet" href="fw/mast/mast.css">
- <link rel="stylesheet" href="fw/svg/glyph.css">
- <link rel="stylesheet" href="fw/svg/icon.css">
- <link rel="stylesheet" href="fw/layer/panel.css">
- <link rel="stylesheet" href="fw/layer/flash.css">
- <link rel="stylesheet" href="fw/layer/quickhelp.css">
- <link rel="stylesheet" href="fw/layer/veil.css">
- <link rel="stylesheet" href="fw/nav/nav.css">
-
- <!-- This is where contributed javascript will get injected -->
- <!-- {INJECTED-JAVASCRIPT-START} -->
- <script src="view/sample/sample.js"></script>
- <script src="view/topo/topo.js"></script>
- <script src="view/topo/topoEvent.js"></script>
- <script src="view/topo/topoFilter.js"></script>
- <script src="view/topo/topoForce.js"></script>
- <script src="view/topo/topoInst.js"></script>
- <script src="view/topo/topoModel.js"></script>
- <script src="view/topo/topoOblique.js"></script>
- <script src="view/topo/topoPanel.js"></script>
- <script src="view/topo/topoSelect.js"></script>
- <script src="view/topo/topoTraffic.js"></script>
- <script src="view/device/device.js"></script>
- <!-- {INJECTED-JAVASCRIPT-END} -->
-
-
- <!-- This is where contributed stylesheets will get injected -->
- <!-- {INJECTED-STYLESHEETS-START} -->
- <link rel="stylesheet" href="view/sample/sample.css">
- <link rel="stylesheet" href="view/topo/topo.css">
- <link rel="stylesheet" href="view/device/device.css">
- <!-- TODO: inject style-sheet refs server-side -->
- <!-- {INJECTED-STYLESHEETS-END} -->
-
-</head>
-<body class="light" ng-app="onosApp">
-<div id="frame" ng-controller="OnosCtrl as onosCtrl">
- <div id="mast"
- ng-controller="MastCtrl as mastCtrl"
- ng-include="'fw/mast/mast.html'"></div>
-
- <div id="view" ng-view></div>
-
- <div id="nav"
- ng-controller="NavCtrl as navCtrl"
- ng-include="'fw/nav/nav.html'"></div>
-
- <div id="floatpanels"></div>
- <div id="alerts"></div>
- <div id="flash"></div>
- <div id="quickhelp"></div>
- <div id="veil"
- resize
- ng-style="resizeWithOffset(0, 0)"></div>
-</div>
-</body>
-</html>
diff --git a/web/gui/src/main/webapp/app/onos.js b/web/gui/src/main/webapp/app/onos.js
deleted file mode 100644
index f2d58a5..0000000
--- a/web/gui/src/main/webapp/app/onos.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright 2014,2015 Open Networking Laboratory
- *
- * Licensed 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.
- */
-
-/*
- ONOS GUI -- Main Application Module
- */
-
-(function () {
- 'use strict';
-
- // define core module dependencies here...
- var coreDependencies = [
- 'ngRoute',
- 'onosMast',
- 'onosNav',
- 'onosUtil',
- 'onosSvg',
- 'onosRemote',
- 'onosLayer',
- 'onosWidget'
- ];
-
- // view IDs.. note the first view listed is loaded at startup
- var viewIds = [
- // TODO: inject view IDs server side
- // {INJECTED-VIEW-IDS-START}
- 'sample',
- 'topo',
- 'device',
- // {INJECTED-VIEW-IDS-END}
-
- // dummy entry
- ''
- ];
-
- var viewDependencies = [];
-
- viewIds.forEach(function (id) {
- if (id) {
- viewDependencies.push('ov' + capitalize(id));
- }
- });
-
- var moduleDependencies = coreDependencies.concat(viewDependencies);
-
- function capitalize(word) {
- return word ? word[0].toUpperCase() + word.slice(1) : word;
- }
-
- angular.module('onosApp', moduleDependencies)
-
- .controller('OnosCtrl', [
- '$log', '$route', '$routeParams', '$location',
- 'KeyService', 'ThemeService', 'GlyphService', 'PanelService',
- 'FlashService', 'QuickHelpService',
-
- function ($log, $route, $routeParams, $location,
- ks, ts, gs, ps, flash, qhs) {
- var self = this;
-
- self.$route = $route;
- self.$routeParams = $routeParams;
- self.$location = $location;
- self.version = '1.1.0';
-
- // initialize services...
- ts.init();
- ks.installOn(d3.select('body'));
- ks.bindQhs(qhs);
- gs.init();
- ps.init();
- flash.initFlash();
- qhs.initQuickHelp();
-
- $log.log('OnosCtrl has been created');
-
- $log.debug('route: ', self.$route);
- $log.debug('routeParams: ', self.$routeParams);
- $log.debug('location: ', self.$location);
- }])
-
- .config(['$routeProvider', function ($routeProvider) {
- // If view ID not provided, route to the first view in the list.
- $routeProvider
- .otherwise({
- redirectTo: '/' + viewIds[0]
- });
-
- function viewCtrlName(vid) {
- return 'Ov' + capitalize(vid) + 'Ctrl';
- }
-
- function viewTemplateUrl(vid) {
- return 'view/' + vid + '/' + vid + '.html';
- }
-
- // Add routes for each defined view.
- viewIds.forEach(function (vid) {
- if (vid) {
- $routeProvider.when('/' + vid, {
- controller: viewCtrlName(vid),
- controllerAs: 'ctrl',
- templateUrl: viewTemplateUrl(vid)
- });
- }
- });
- }]);
-}());
diff --git a/web/gui/src/main/webapp/app/view/sample/sample.html b/web/gui/src/main/webapp/app/view/sample/sample.html
index 113b725..c215830 100644
--- a/web/gui/src/main/webapp/app/view/sample/sample.html
+++ b/web/gui/src/main/webapp/app/view/sample/sample.html
@@ -2,7 +2,7 @@
<div id="ov-sample">
<h2> A Sample View </h2>
- <img class="logo" src="../data/img/onos-logo.png">
+ <img class="logo" src="data/img/onos-logo.png">
<p>
This is a <i>view</i> distinct from the Topology viewer,
diff --git a/web/gui/src/main/webapp/index.html b/web/gui/src/main/webapp/index.html
new file mode 100644
index 0000000..0e62297
--- /dev/null
+++ b/web/gui/src/main/webapp/index.html
@@ -0,0 +1,130 @@
+<!DOCTYPE html>
+<!--
+~ Copyright 2014,2015 Open Networking Laboratory
+~
+~ Licensed 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.
+-->
+<html>
+<head>
+ <meta charset="utf-8">
+ <link rel="shortcut icon" href="data/img/onos-logo.png">
+ <title>ONOS Angular</title>
+
+ <!-- Third party library code included here -->
+ <!--TODO: use minified versions, once debugging is complete -->
+ <script src="tp/angular.js"></script>
+ <script src="tp/angular-route.js"></script>
+
+ <script src="tp/d3.js"></script>
+ <script src="tp/topojson.v1.min.js"></script>
+
+ <!-- ONOS UI Framework included here -->
+ <!-- TODO: use a single catenated-minified file here -->
+ <script src="onos.js"></script>
+ <script src="app/directives.js"></script>
+
+ <script src="app/fw/util/util.js"></script>
+ <script src="app/fw/util/fn.js"></script>
+ <script src="app/fw/util/random.js"></script>
+ <script src="app/fw/util/theme.js"></script>
+ <script src="app/fw/util/keys.js"></script>
+
+ <script src="app/fw/mast/mast.js"></script>
+ <script src="app/fw/nav/nav.js"></script>
+
+ <script src="app/fw/svg/svg.js"></script>
+ <script src="app/fw/svg/glyph.js"></script>
+ <script src="app/fw/svg/icon.js"></script>
+ <script src="app/fw/svg/geodata.js"></script>
+ <script src="app/fw/svg/map.js"></script>
+ <script src="app/fw/svg/zoom.js"></script>
+ <script src="app/fw/svg/svgUtil.js"></script>
+
+ <script src="app/fw/remote/remote.js"></script>
+ <script src="app/fw/remote/urlfn.js"></script>
+ <script src="app/fw/remote/rest.js"></script>
+ <script src="app/fw/remote/websocket.js"></script>
+ <script src="app/fw/remote/wsevent.js"></script>
+
+ <script src="app/fw/widget/widget.js"></script>
+ <script src="app/fw/widget/table.js"></script>
+ <script src="app/fw/widget/toolbar.js"></script>
+ <script src="app/fw/widget/button.js"></script>
+
+ <script src="app/fw/layer/layer.js"></script>
+ <script src="app/fw/layer/panel.js"></script>
+ <script src="app/fw/layer/flash.js"></script>
+ <script src="app/fw/layer/quickhelp.js"></script>
+ <script src="app/fw/layer/veil.js"></script>
+
+ <!-- Framework and library stylesheets included here -->
+ <!-- TODO: use a single catenated-minified file here -->
+ <link rel="stylesheet" href="app/onos.css">
+ <link rel="stylesheet" href="app/common.css">
+ <link rel="stylesheet" href="app/fw/mast/mast.css">
+ <link rel="stylesheet" href="app/fw/svg/glyph.css">
+ <link rel="stylesheet" href="app/fw/svg/icon.css">
+ <link rel="stylesheet" href="app/fw/layer/panel.css">
+ <link rel="stylesheet" href="app/fw/layer/flash.css">
+ <link rel="stylesheet" href="app/fw/layer/quickhelp.css">
+ <link rel="stylesheet" href="app/fw/layer/veil.css">
+ <link rel="stylesheet" href="app/fw/nav/nav.css">
+
+ <!-- This is where contributed javascript will get injected -->
+ <!-- {INJECTED-JAVASCRIPT-START} -->
+ <script src="app/view/sample/sample.js"></script>
+ <script src="app/view/topo/topo.js"></script>
+ <script src="app/view/topo/topoEvent.js"></script>
+ <script src="app/view/topo/topoFilter.js"></script>
+ <script src="app/view/topo/topoForce.js"></script>
+ <script src="app/view/topo/topoInst.js"></script>
+ <script src="app/view/topo/topoModel.js"></script>
+ <script src="app/view/topo/topoOblique.js"></script>
+ <script src="app/view/topo/topoPanel.js"></script>
+ <script src="app/view/topo/topoSelect.js"></script>
+ <script src="app/view/topo/topoTraffic.js"></script>
+ <script src="app/view/device/device.js"></script>
+ <!-- {INJECTED-JAVASCRIPT-END} -->
+
+
+ <!-- This is where contributed stylesheets will get injected -->
+ <!-- {INJECTED-STYLESHEETS-START} -->
+ <link rel="stylesheet" href="app/view/sample/sample.css">
+ <link rel="stylesheet" href="app/view/topo/topo.css">
+ <link rel="stylesheet" href="app/view/device/device.css">
+ <!-- TODO: inject style-sheet refs server-side -->
+ <!-- {INJECTED-STYLESHEETS-END} -->
+
+</head>
+<body class="light" ng-app="onosApp">
+<div id="frame" ng-controller="OnosCtrl as onosCtrl">
+ <div id="mast"
+ ng-controller="MastCtrl as mastCtrl"
+ ng-include="'app/fw/mast/mast.html'"></div>
+
+ <div id="view" ng-view></div>
+
+ <div id="nav"
+ ng-controller="NavCtrl as navCtrl"
+ ng-include="'nav.html'"></div>
+
+ <div id="floatpanels"></div>
+ <div id="alerts"></div>
+ <div id="flash"></div>
+ <div id="quickhelp"></div>
+ <div id="veil"
+ resize
+ ng-style="resizeWithOffset(0, 0)"></div>
+</div>
+</body>
+</html>
diff --git a/web/gui/src/main/webapp/app/fw/nav/nav.html b/web/gui/src/main/webapp/nav.html
similarity index 81%
rename from web/gui/src/main/webapp/app/fw/nav/nav.html
rename to web/gui/src/main/webapp/nav.html
index 1f74ab1..f39ffee 100644
--- a/web/gui/src/main/webapp/app/fw/nav/nav.html
+++ b/web/gui/src/main/webapp/nav.html
@@ -3,7 +3,9 @@
<h3>(Note - this is temporary)</h3>
<ul>
+ <!-- {INJECTED-VIEW-NAV-START} -->
<li> <a ng-click="navCtrl.hideNav()" href="#/sample">Sample View</a></li>
<li> <a ng-click="navCtrl.hideNav()" href="#/topo">Topology View</a></li>
<li> <a ng-click="navCtrl.hideNav()" href="#/device">Device View</a></li>
+ <!-- {INJECTED-VIEW-NAV-END} -->
</ul>
diff --git a/web/gui/src/main/resources/templates/onos-template.js b/web/gui/src/main/webapp/onos.js
similarity index 100%
copy from web/gui/src/main/resources/templates/onos-template.js
copy to web/gui/src/main/webapp/onos.js
diff --git a/web/gui/src/main/webapp/tests/app/fw/svg/geodata-spec.js b/web/gui/src/main/webapp/tests/app/fw/svg/geodata-spec.js
index b76ffa4..ccf4782 100644
--- a/web/gui/src/main/webapp/tests/app/fw/svg/geodata-spec.js
+++ b/web/gui/src/main/webapp/tests/app/fw/svg/geodata-spec.js
@@ -51,7 +51,7 @@
promise = gds.fetchTopoData(id);
expect(promise.meta).toBeDefined();
expect(promise.meta.id).toBe(id);
- expect(promise.meta.url).toBe('../data/map/foo.json');
+ expect(promise.meta.url).toBe('data/map/foo.json');
});
it('should treat an external id as the url itself', function () {