GUI -- Fixed topology view failover.
- Promoted the new dynamically composed GUI page as the primary.
- Legacy is still available under onos/ui/legacy/index.html

Change-Id: Ife0ba50b7b4b567913498d80c2d261379ee268a5
diff --git a/web/gui/src/main/resources/core/js.html b/web/gui/src/main/resources/core/js.html
index dde2271..186cac8 100644
--- a/web/gui/src/main/resources/core/js.html
+++ b/web/gui/src/main/resources/core/js.html
@@ -1,4 +1,3 @@
-<script src="app/view/sample/sample.js"></script>
 <script src="app/view/topo/topo.js"></script>
 <script src="app/view/topo/topoD3.js"></script>
 <script src="app/view/topo/topoEvent.js"></script>
@@ -11,4 +10,6 @@
 <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/topo/topoToolbar.js"></script>
 <script src="app/view/device/device.js"></script>
+<script src="app/view/sample/sample.js"></script>
diff --git a/web/gui/src/main/webapp/WEB-INF/web.xml b/web/gui/src/main/webapp/WEB-INF/web.xml
index 5371354..7e88d95 100644
--- a/web/gui/src/main/webapp/WEB-INF/web.xml
+++ b/web/gui/src/main/webapp/WEB-INF/web.xml
@@ -21,7 +21,7 @@
     <display-name>ONOS GUI</display-name>
 
     <welcome-file-list>
-        <welcome-file>legacy/index.html</welcome-file>
+        <welcome-file>index.html</welcome-file>
     </welcome-file-list>
 
     <!--
@@ -67,6 +67,7 @@
 
     <servlet-mapping>
         <servlet-name>Index Page</servlet-name>
+        <url-pattern>/index.html</url-pattern>
         <url-pattern>/main.html</url-pattern>
     </servlet-mapping>
 
diff --git a/web/gui/src/main/webapp/app/view/topo/topoEvent.js b/web/gui/src/main/webapp/app/view/topo/topoEvent.js
index 7289e9d..4378e6d 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoEvent.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoEvent.js
@@ -61,10 +61,8 @@
 
     function wsOpen(host, url) {
         $log.debug('TOPO: web socket open - cluster node:', host, 'URL:', url);
-
-        // TODO: request "instanceUpdate" events for all instances
-        // this should give us the updated uiAttached icon placement
-
+        // Request batch of initial data from the new server
+        wss.sendEvent('topoStart');
     }
 
     angular.module('ovTopo')
diff --git a/web/gui/src/main/webapp/index.html b/web/gui/src/main/webapp/index.html
index 1bd5f33..7b23671 100644
--- a/web/gui/src/main/webapp/index.html
+++ b/web/gui/src/main/webapp/index.html
@@ -86,7 +86,6 @@
 
     <!-- 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/topoD3.js"></script>
     <script src="app/view/topo/topoEvent.js"></script>
@@ -101,14 +100,15 @@
     <script src="app/view/topo/topoTraffic.js"></script>
     <script src="app/view/topo/topoToolbar.js"></script>
     <script src="app/view/device/device.js"></script>
+    <script src="app/view/sample/sample.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">
+    <link rel="stylesheet" href="app/view/sample/sample.css">
     <!-- {INJECTED-STYLESHEETS-END} -->
 
 </head>