GUI - Cleanup of old files.
Change-Id: I2fd30f32d15ecb0b97ee7f380523ebb8513a6a01
diff --git a/web/gui/src/main/webapp/geometry.js b/web/gui/src/main/webapp/OLD/geometry.js
similarity index 100%
rename from web/gui/src/main/webapp/geometry.js
rename to web/gui/src/main/webapp/OLD/geometry.js
diff --git a/web/gui/src/main/webapp/index.html b/web/gui/src/main/webapp/OLD/index.html
similarity index 89%
rename from web/gui/src/main/webapp/index.html
rename to web/gui/src/main/webapp/OLD/index.html
index 337eca7..7fecd38 100644
--- a/web/gui/src/main/webapp/index.html
+++ b/web/gui/src/main/webapp/OLD/index.html
@@ -26,20 +26,20 @@
<title>ONOS GUI</title>
<!--TODO: use the minified version of d3, once debugging is complete -->
- <script src="libs/d3.js"></script>
- <script src="libs/jquery-2.1.1.min.js"></script>
+ <script src="../libs/d3.js"></script>
+ <script src="../libs/jquery-2.1.1.min.js"></script>
- <link rel="stylesheet" href="base.css">
+ <link rel="stylesheet" href="../base.css">
<link rel="stylesheet" href="onos.css">
- <script src="geometry.js"></script>
+ <script src="../geometry.js"></script>
<script src="onos.js"></script>
</head>
<body>
<div id="frame">
<div id="mast">
- <img id="logo" src="img/onos-logo.png">
+ <img id="logo" src="../img/onos-logo.png">
<span class="title">Open Network Operating System</span>
<span id="displayModes" class="right">
<span id="showAll" class="radio active">All Layers</span>
diff --git a/web/gui/src/main/webapp/json/network.json b/web/gui/src/main/webapp/OLD/json/network.json
similarity index 100%
rename from web/gui/src/main/webapp/json/network.json
rename to web/gui/src/main/webapp/OLD/json/network.json
diff --git a/web/gui/src/main/webapp/json/network2.json b/web/gui/src/main/webapp/OLD/json/network2.json
similarity index 100%
rename from web/gui/src/main/webapp/json/network2.json
rename to web/gui/src/main/webapp/OLD/json/network2.json
diff --git a/web/gui/src/main/webapp/json/of_0000000000000001.json b/web/gui/src/main/webapp/OLD/json/of_0000000000000001.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000000000000001.json
rename to web/gui/src/main/webapp/OLD/json/of_0000000000000001.json
diff --git a/web/gui/src/main/webapp/json/of_0000000000000002.json b/web/gui/src/main/webapp/OLD/json/of_0000000000000002.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000000000000002.json
rename to web/gui/src/main/webapp/OLD/json/of_0000000000000002.json
diff --git a/web/gui/src/main/webapp/json/of_0000000000000003.json b/web/gui/src/main/webapp/OLD/json/of_0000000000000003.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000000000000003.json
rename to web/gui/src/main/webapp/OLD/json/of_0000000000000003.json
diff --git a/web/gui/src/main/webapp/json/of_0000000000000004.json b/web/gui/src/main/webapp/OLD/json/of_0000000000000004.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000000000000004.json
rename to web/gui/src/main/webapp/OLD/json/of_0000000000000004.json
diff --git a/web/gui/src/main/webapp/json/of_0000000000000011.json b/web/gui/src/main/webapp/OLD/json/of_0000000000000011.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000000000000011.json
rename to web/gui/src/main/webapp/OLD/json/of_0000000000000011.json
diff --git a/web/gui/src/main/webapp/json/of_0000000000000012.json b/web/gui/src/main/webapp/OLD/json/of_0000000000000012.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000000000000012.json
rename to web/gui/src/main/webapp/OLD/json/of_0000000000000012.json
diff --git a/web/gui/src/main/webapp/json/of_0000000000000013.json b/web/gui/src/main/webapp/OLD/json/of_0000000000000013.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000000000000013.json
rename to web/gui/src/main/webapp/OLD/json/of_0000000000000013.json
diff --git a/web/gui/src/main/webapp/json/of_0000ffffffff0007.json b/web/gui/src/main/webapp/OLD/json/of_0000ffffffff0007.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000ffffffff0007.json
rename to web/gui/src/main/webapp/OLD/json/of_0000ffffffff0007.json
diff --git a/web/gui/src/main/webapp/json/of_0000ffffffff0009.json b/web/gui/src/main/webapp/OLD/json/of_0000ffffffff0009.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000ffffffff0009.json
rename to web/gui/src/main/webapp/OLD/json/of_0000ffffffff0009.json
diff --git a/web/gui/src/main/webapp/json/of_0000ffffffffff07.json b/web/gui/src/main/webapp/OLD/json/of_0000ffffffffff07.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000ffffffffff07.json
rename to web/gui/src/main/webapp/OLD/json/of_0000ffffffffff07.json
diff --git a/web/gui/src/main/webapp/json/of_0000ffffffffff09.json b/web/gui/src/main/webapp/OLD/json/of_0000ffffffffff09.json
similarity index 100%
rename from web/gui/src/main/webapp/json/of_0000ffffffffff09.json
rename to web/gui/src/main/webapp/OLD/json/of_0000ffffffffff09.json
diff --git a/web/gui/src/main/webapp/network.js b/web/gui/src/main/webapp/OLD/network.js
similarity index 97%
rename from web/gui/src/main/webapp/network.js
rename to web/gui/src/main/webapp/OLD/network.js
index 01e4acd..008ef90 100644
--- a/web/gui/src/main/webapp/network.js
+++ b/web/gui/src/main/webapp/OLD/network.js
@@ -157,8 +157,8 @@
d3.json(url , function (err, data) {
if (err) {
alert('Oops! Error reading JSON...\n\n' +
- 'URL: ' + url + '\n\n' +
- 'Error: ' + err.message);
+ 'URL: ' + url + '\n\n' +
+ 'Error: ' + err.message);
return;
}
// console.log("here is the JSON data...");
@@ -263,7 +263,7 @@
.attr('y', 15)
.style('font-size', '20pt')
.text('keyCode: ' + d3.event.keyCode +
- ' applied to : ' + contextLabel())
+ ' applied to : ' + contextLabel())
.transition().duration(2000)
.style('font-size', '2pt')
.style('fill-opacity', 0.01)
@@ -474,7 +474,7 @@
'xlink:href': config.backgroundUrl
})
.style('visibility',
- config.options.loadBackground ? 'visible' : 'hidden');
+ config.options.loadBackground ? 'visible' : 'hidden');
// function zoomRedraw() {
// d3.select("#zoomable").attr("transform",
@@ -493,9 +493,9 @@
glow.append('feColorMatrix')
.attr('type', 'matrix')
.attr('values', '0 0 0 0 0 ' +
- '0 0 0 0 0 ' +
- '0 0 0 0 .7 ' +
- '0 0 0 1 0 ');
+ '0 0 0 0 0 ' +
+ '0 0 0 0 .7 ' +
+ '0 0 0 1 0 ');
glow.append('feGaussianBlur')
.attr('stdDeviation', 3)
@@ -596,14 +596,14 @@
if (d.source.type)
- network.linkSrcPort.append('rect').attr({
- id: 'srcPort-' + safeId(d.id),
- class: 'port ' + srcType,
- width: pw,
- height: ph,
- rx: 4,
- ry: 4
- }).style('visibility', portVis);
+ network.linkSrcPort.append('rect').attr({
+ id: 'srcPort-' + safeId(d.id),
+ class: 'port ' + srcType,
+ width: pw,
+ height: ph,
+ rx: 4,
+ ry: 4
+ }).style('visibility', portVis);
network.linkTgtPort.append('rect').attr({
id: 'tgtPort-' + safeId(d.id),
@@ -673,15 +673,15 @@
width: 100,
height: 12
});
- // note that width/height are adjusted to fit the label text
- // then padded, and space made for the icon.
+ // note that width/height are adjusted to fit the label text
+ // then padded, and space made for the icon.
network.node.filter('.device').each(function(d) {
var node = d3.select(this),
icon = iconUrl(d);
node.append('text')
- // TODO: add label cycle behavior
+ // TODO: add label cycle behavior
.text(d.id)
.attr('dy', '1.1em');
@@ -1100,8 +1100,8 @@
d3.json(url, function (err, data) {
if (err) {
alert('Oops! Error reading JSON...\n\n' +
- 'URL: ' + url + '\n\n' +
- 'Error: ' + err.message);
+ 'URL: ' + url + '\n\n' +
+ 'Error: ' + err.message);
return;
}
// console.log("JSON data... " + url);
diff --git a/web/gui/src/main/webapp/onos.css b/web/gui/src/main/webapp/OLD/onos.css
similarity index 100%
rename from web/gui/src/main/webapp/onos.css
rename to web/gui/src/main/webapp/OLD/onos.css
diff --git a/web/gui/src/main/webapp/onos.js b/web/gui/src/main/webapp/OLD/onos.js
similarity index 100%
rename from web/gui/src/main/webapp/onos.js
rename to web/gui/src/main/webapp/OLD/onos.js
diff --git a/web/gui/src/main/webapp/topo2-OLD.js b/web/gui/src/main/webapp/OLD/topo2-OLD.js
similarity index 100%
rename from web/gui/src/main/webapp/topo2-OLD.js
rename to web/gui/src/main/webapp/OLD/topo2-OLD.js
diff --git a/web/gui/src/main/webapp/index2.html b/web/gui/src/main/webapp/index2.html
index 52b84bd..b2e72ff 100644
--- a/web/gui/src/main/webapp/index2.html
+++ b/web/gui/src/main/webapp/index2.html
@@ -24,13 +24,10 @@
<html>
<head>
<meta charset="utf-8">
- <title>ONOS GUI (v1.1)</title>
+ <title>ONOS</title>
<link rel="shortcut icon" href="img/onos-logo.png">
- <!-- first script to be run -->
- <script src="preamble.js"></script>
-
<!-- Third party library code included here -->
<!--TODO: use the minified version of d3, once debugging is complete -->
<script src="libs/d3.js"></script>
@@ -48,7 +45,6 @@
<!-- This is where contributed stylesheets get INJECTED -->
<!-- TODO: replace with template marker and inject refs server-side -->
<link rel="stylesheet" href="topo2.css">
- <link rel="stylesheet" href="webSockTrace.css">
<!-- General library modules included here-->
@@ -86,8 +82,7 @@
var ONOS = $.onos({
comment: 'configuration options',
theme: 'dark',
- startVid: 'topo',
- trace: false
+ startVid: 'topo'
});
</script>
@@ -112,8 +107,6 @@
<!-- Contributed (application) views injected here -->
<!-- TODO: replace with template marker and inject refs server-side -->
- <script src="webSockTrace.js"></script>
-
<script src="topo2.js"></script>
<!-- finally, build the UI-->
diff --git a/web/gui/src/main/webapp/preamble.js b/web/gui/src/main/webapp/preamble.js
deleted file mode 100644
index b6a8c02..0000000
--- a/web/gui/src/main/webapp/preamble.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2014 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 -- Preamble -- the first thing we do
-
- @author Simon Hunt
- */
-
-(function () {
-
- // NOTE: DON'T Want to do this.. we want to be able to
- // use the parameter section, for example:
- // #viewId,context?flag1,flag2,flag3
-
- // Check if the URL in the address bar contains a parameter section
- // (delineated by '?'). If this is the case, rewrite using '#' instead.
-
- //var m = /([^?]*)\?(.*)/.exec(window.location.href);
- //if (m) {
- // window.location.href = m[1] + '#' + m[2];
- //}
-
-}());
diff --git a/web/gui/src/main/webapp/webSockTrace.css b/web/gui/src/main/webapp/webSockTrace.css
deleted file mode 100644
index 6669124..0000000
--- a/web/gui/src/main/webapp/webSockTrace.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2014 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 -- Web Socket Trace -- CSS file
-
- @author Simon Hunt
- */
-
-#webSockTrace .toolbar {
- height: 36px;
- padding: 4px;
- vertical-align: baseline;
- font-size: 12pt;
- margin-top: 6px;
-}
-
-/* theme-related */
-#webSockTrace .toolbar {
- background-color: #448;
- color: #fff;
-}
-
-#webSockTrace .output {
- overflow-y: scroll;
-}
-
-/* theme-related */
-#webSockTrace .output {
- background-color: #eef;
- color: #226;
-}
-
-#webSockTrace .output p {
- margin: 2px 8px;
- font-size: 10pt;
- padding-left: 6px;
-}
-
-/* theme-related */
-#webSockTrace .output p.tx {
- color: magenta;
-}
-#webSockTrace .output p.rx {
- color: blue;
-}
-
-
-#webSockTrace .output p.subtitle {
- margin: 6px 8px;
- padding-left: 2px;
- font-size: 12pt;
- font-weight: bold;
- font-style: italic;
-}
-
-/* theme-related */
-#webSockTrace .output p.subtitle {
- color: #626;
-}
diff --git a/web/gui/src/main/webapp/webSockTrace.js b/web/gui/src/main/webapp/webSockTrace.js
deleted file mode 100644
index 2f09b31..0000000
--- a/web/gui/src/main/webapp/webSockTrace.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2014 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.
- */
-
-/*
- View that traces messages across the websocket.
-
- @author Simon Hunt
- */
-
-(function (onos) {
- 'use strict';
-
- var v,
- $d,
- tb,
- out,
- which = 'tx',
- keyDispatch = {
- space: function () {
- output(which, "Simon woz 'ere... " + which);
- which = (which === 'tx') ? 'rx' : 'tx';
- }
- };
-
-
- function addHeader() {
- tb = $d.append('div')
- .attr('class', 'toolbar');
- tb.append('span').text('Web Socket Trace');
- }
-
- function addOutput() {
- out = $d.append('div')
- .attr('class', 'output');
- }
-
- function subtitle(msg) {
- out.append('p').attr('class', 'subtitle').text(msg);
- }
-
- function output(rxtx, msg) {
- out.append('p').attr('class', rxtx).text(msg);
- }
-
- // invoked only the first time the view is loaded
- function preload(view, ctx, flags) {
- // NOTE: view.$div is a D3 selection of the view's div
- v = view;
- $d = v.$div;
- addHeader();
- addOutput();
-
-
- // hack for now, to allow topo access to our API
- // TODO: add 'exportApi' and 'importApi' to views.
- onos.exported.webSockTrace = {
- subtitle: subtitle,
- output: output
- };
- }
-
- // invoked just prior to loading the view
- function reset(view, ctx, flags) {
-
- }
-
- // invoked when the view is loaded
- function load(view, ctx, flags) {
- resize(view, ctx, flags);
- view.setKeys(keyDispatch);
- subtitle('Waiting for messages...');
- }
-
- // invoked when the view is resized
- function resize(view, ctx, flags) {
- var h = view.height();
- out.style('height', h + 'px');
-
- }
-
- // == register the view here, with links to lifecycle callbacks
-
- onos.ui.addView('webSockTrace', {
- preload: preload,
- load: load,
- resize: resize
- });
-
-}(ONOS));
diff --git a/web/gui/src/main/webapp/ws.html b/web/gui/src/main/webapp/ws.html
deleted file mode 100644
index cac99b2..0000000
--- a/web/gui/src/main/webapp/ws.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<html>
-<head>
- <title>Web Sockets Demo</title>
-
- <script src="libs/jquery-2.1.1.min.js"></script>
-
- <script type='text/javascript'>
- if (!window.WebSocket)
- alert("WebSocket not supported by this browser");
-
- var server = {
- connect : function() {
- var location = document.location.toString().replace('http://',
- 'ws://').replace('https://', 'wss://').replace('ws.html','ws/topology');
- this.ws = new WebSocket(location);
-
- this.ws.onopen = function() {
- server._send("Hi there!");
- };
-
- this.ws.onmessage = function(m) {
- if (m.data) {
- $('#log').append(m.data).append($('<br/>'));
- }
- };
-
- this.ws.onclose = function(m) {
- this.ws = null;
- };
- },
-
- _send : function(message) {
- if (this.ws) {
- this.ws.send(message);
- }
- },
-
- send : function(text) {
- if (text != null && text.length > 0) {
- server._send(text);
- }
- }
- };
- </script>
-</head>
-<body>
-<pre id='log'></pre>
-
-<script type='text/javascript'>
- server.connect();
-</script>
-
-</body>
-</html>