Preparing for dynamic GUI extensibility.

Change-Id: Ic25143bb9ad8919d7c9e70d932dde528a9227e6a
diff --git a/web/gui/src/main/webapp/WEB-INF/web.xml b/web/gui/src/main/webapp/WEB-INF/web.xml
index f757c6a..73f0c67c 100644
--- a/web/gui/src/main/webapp/WEB-INF/web.xml
+++ b/web/gui/src/main/webapp/WEB-INF/web.xml
@@ -59,7 +59,7 @@
         </init-param>
         <init-param>
             <param-name>com.sun.jersey.config.property.classnames</param-name>
-            <param-value>org.onosproject.gui.impl.MainIndexResource</param-value>
+            <param-value>org.onosproject.ui.impl.MainIndexResource</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
@@ -78,7 +78,7 @@
         </init-param>
         <init-param>
             <param-name>com.sun.jersey.config.property.classnames</param-name>
-            <param-value>org.onosproject.gui.impl.MainExtResource</param-value>
+            <param-value>org.onosproject.ui.impl.MainExtResource</param-value>
         </init-param>
         <load-on-startup>1</load-on-startup>
     </servlet>
diff --git a/web/gui/src/main/webapp/app/index.html b/web/gui/src/main/webapp/app/index.html
index 53bb8d3..da46345 100644
--- a/web/gui/src/main/webapp/app/index.html
+++ b/web/gui/src/main/webapp/app/index.html
@@ -81,7 +81,7 @@
     <link rel="stylesheet" href="fw/nav/nav.css">
 
     <!-- This is where contributed javascript will get injected -->
-    <!-- {INJECTED-JAVASCRIPT} -->
+    <!-- {INJECTED-JAVASCRIPT-START} -->
     <script src="view/sample/sample.js"></script>
     <script src="view/topo/topo.js"></script>
     <script src="view/topo/topoEvent.js"></script>
@@ -94,34 +94,37 @@
     <script src="view/topo/topoSelect.js"></script>
     <script src="view/topo/topoTraffic.js"></script>
     <script src="view/device/device.js"></script>
-    <!-- TODO: inject javascript refs server-side -->
+    <!-- {INJECTED-JAVASCRIPT-END} -->
+
 
     <!-- This is where contributed stylesheets will get injected -->
-    <!-- {INJECTED-STYLESHEETS} -->
+    <!-- {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="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="view" ng-view></div>
 
-        <div id="nav"
-             ng-controller="NavCtrl as navCtrl"
-             ng-include="'fw/nav/nav.html'"></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>
+    <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
index 55c7b05..f2d58a5 100644
--- a/web/gui/src/main/webapp/app/onos.js
+++ b/web/gui/src/main/webapp/app/onos.js
@@ -36,11 +36,11 @@
     // view IDs.. note the first view listed is loaded at startup
     var viewIds = [
         // TODO: inject view IDs server side
-        // {INJECTED-VIEW-IDS}
+        // {INJECTED-VIEW-IDS-START}
         'sample',
         'topo',
         'device',
-        // (end of injected views)
+        // {INJECTED-VIEW-IDS-END}
 
         // dummy entry
         ''
@@ -67,30 +67,30 @@
             'KeyService', 'ThemeService', 'GlyphService', 'PanelService',
             'FlashService', 'QuickHelpService',
 
-        function ($log, $route, $routeParams, $location,
-                  ks, ts, gs, ps, flash, qhs) {
-            var self = this;
+            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';
+                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();
+                // 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.log('OnosCtrl has been created');
 
-            $log.debug('route: ', self.$route);
-            $log.debug('routeParams: ', self.$routeParams);
-            $log.debug('location: ', self.$location);
-        }])
+                $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.
@@ -102,6 +102,7 @@
             function viewCtrlName(vid) {
                 return 'Ov' + capitalize(vid) + 'Ctrl';
             }
+
             function viewTemplateUrl(vid) {
                 return 'view/' + vid + '/' + vid + '.html';
             }