GUI - Cleanup of old files.
Change-Id: I2fd30f32d15ecb0b97ee7f380523ebb8513a6a01
Showing
24 changed files
with
7 additions
and
280 deletions
... | @@ -26,20 +26,20 @@ | ... | @@ -26,20 +26,20 @@ |
26 | <title>ONOS GUI</title> | 26 | <title>ONOS GUI</title> |
27 | 27 | ||
28 | <!--TODO: use the minified version of d3, once debugging is complete --> | 28 | <!--TODO: use the minified version of d3, once debugging is complete --> |
29 | - <script src="libs/d3.js"></script> | 29 | + <script src="../libs/d3.js"></script> |
30 | - <script src="libs/jquery-2.1.1.min.js"></script> | 30 | + <script src="../libs/jquery-2.1.1.min.js"></script> |
31 | 31 | ||
32 | - <link rel="stylesheet" href="base.css"> | 32 | + <link rel="stylesheet" href="../base.css"> |
33 | <link rel="stylesheet" href="onos.css"> | 33 | <link rel="stylesheet" href="onos.css"> |
34 | 34 | ||
35 | - <script src="geometry.js"></script> | 35 | + <script src="../geometry.js"></script> |
36 | <script src="onos.js"></script> | 36 | <script src="onos.js"></script> |
37 | 37 | ||
38 | </head> | 38 | </head> |
39 | <body> | 39 | <body> |
40 | <div id="frame"> | 40 | <div id="frame"> |
41 | <div id="mast"> | 41 | <div id="mast"> |
42 | - <img id="logo" src="img/onos-logo.png"> | 42 | + <img id="logo" src="../img/onos-logo.png"> |
43 | <span class="title">Open Network Operating System</span> | 43 | <span class="title">Open Network Operating System</span> |
44 | <span id="displayModes" class="right"> | 44 | <span id="displayModes" class="right"> |
45 | <span id="showAll" class="radio active">All Layers</span> | 45 | <span id="showAll" class="radio active">All Layers</span> | ... | ... |
File moved
File moved
... | @@ -24,13 +24,10 @@ | ... | @@ -24,13 +24,10 @@ |
24 | <html> | 24 | <html> |
25 | <head> | 25 | <head> |
26 | <meta charset="utf-8"> | 26 | <meta charset="utf-8"> |
27 | - <title>ONOS GUI (v1.1)</title> | 27 | + <title>ONOS</title> |
28 | 28 | ||
29 | <link rel="shortcut icon" href="img/onos-logo.png"> | 29 | <link rel="shortcut icon" href="img/onos-logo.png"> |
30 | 30 | ||
31 | - <!-- first script to be run --> | ||
32 | - <script src="preamble.js"></script> | ||
33 | - | ||
34 | <!-- Third party library code included here --> | 31 | <!-- Third party library code included here --> |
35 | <!--TODO: use the minified version of d3, once debugging is complete --> | 32 | <!--TODO: use the minified version of d3, once debugging is complete --> |
36 | <script src="libs/d3.js"></script> | 33 | <script src="libs/d3.js"></script> |
... | @@ -48,7 +45,6 @@ | ... | @@ -48,7 +45,6 @@ |
48 | <!-- This is where contributed stylesheets get INJECTED --> | 45 | <!-- This is where contributed stylesheets get INJECTED --> |
49 | <!-- TODO: replace with template marker and inject refs server-side --> | 46 | <!-- TODO: replace with template marker and inject refs server-side --> |
50 | <link rel="stylesheet" href="topo2.css"> | 47 | <link rel="stylesheet" href="topo2.css"> |
51 | - <link rel="stylesheet" href="webSockTrace.css"> | ||
52 | 48 | ||
53 | 49 | ||
54 | <!-- General library modules included here--> | 50 | <!-- General library modules included here--> |
... | @@ -86,8 +82,7 @@ | ... | @@ -86,8 +82,7 @@ |
86 | var ONOS = $.onos({ | 82 | var ONOS = $.onos({ |
87 | comment: 'configuration options', | 83 | comment: 'configuration options', |
88 | theme: 'dark', | 84 | theme: 'dark', |
89 | - startVid: 'topo', | 85 | + startVid: 'topo' |
90 | - trace: false | ||
91 | }); | 86 | }); |
92 | </script> | 87 | </script> |
93 | 88 | ||
... | @@ -112,8 +107,6 @@ | ... | @@ -112,8 +107,6 @@ |
112 | 107 | ||
113 | <!-- Contributed (application) views injected here --> | 108 | <!-- Contributed (application) views injected here --> |
114 | <!-- TODO: replace with template marker and inject refs server-side --> | 109 | <!-- TODO: replace with template marker and inject refs server-side --> |
115 | - <script src="webSockTrace.js"></script> | ||
116 | - | ||
117 | <script src="topo2.js"></script> | 110 | <script src="topo2.js"></script> |
118 | 111 | ||
119 | <!-- finally, build the UI--> | 112 | <!-- finally, build the UI--> | ... | ... |
web/gui/src/main/webapp/preamble.js
deleted
100644 → 0
1 | -/* | ||
2 | - * Copyright 2014 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 | - | ||
17 | -/* | ||
18 | - ONOS GUI -- Preamble -- the first thing we do | ||
19 | - | ||
20 | - @author Simon Hunt | ||
21 | - */ | ||
22 | - | ||
23 | -(function () { | ||
24 | - | ||
25 | - // NOTE: DON'T Want to do this.. we want to be able to | ||
26 | - // use the parameter section, for example: | ||
27 | - // #viewId,context?flag1,flag2,flag3 | ||
28 | - | ||
29 | - // Check if the URL in the address bar contains a parameter section | ||
30 | - // (delineated by '?'). If this is the case, rewrite using '#' instead. | ||
31 | - | ||
32 | - //var m = /([^?]*)\?(.*)/.exec(window.location.href); | ||
33 | - //if (m) { | ||
34 | - // window.location.href = m[1] + '#' + m[2]; | ||
35 | - //} | ||
36 | - | ||
37 | -}()); |
1 | -/* | ||
2 | - * Copyright 2014 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 | - | ||
17 | -/* | ||
18 | - ONOS GUI -- Web Socket Trace -- CSS file | ||
19 | - | ||
20 | - @author Simon Hunt | ||
21 | - */ | ||
22 | - | ||
23 | -#webSockTrace .toolbar { | ||
24 | - height: 36px; | ||
25 | - padding: 4px; | ||
26 | - vertical-align: baseline; | ||
27 | - font-size: 12pt; | ||
28 | - margin-top: 6px; | ||
29 | -} | ||
30 | - | ||
31 | -/* theme-related */ | ||
32 | -#webSockTrace .toolbar { | ||
33 | - background-color: #448; | ||
34 | - color: #fff; | ||
35 | -} | ||
36 | - | ||
37 | -#webSockTrace .output { | ||
38 | - overflow-y: scroll; | ||
39 | -} | ||
40 | - | ||
41 | -/* theme-related */ | ||
42 | -#webSockTrace .output { | ||
43 | - background-color: #eef; | ||
44 | - color: #226; | ||
45 | -} | ||
46 | - | ||
47 | -#webSockTrace .output p { | ||
48 | - margin: 2px 8px; | ||
49 | - font-size: 10pt; | ||
50 | - padding-left: 6px; | ||
51 | -} | ||
52 | - | ||
53 | -/* theme-related */ | ||
54 | -#webSockTrace .output p.tx { | ||
55 | - color: magenta; | ||
56 | -} | ||
57 | -#webSockTrace .output p.rx { | ||
58 | - color: blue; | ||
59 | -} | ||
60 | - | ||
61 | - | ||
62 | -#webSockTrace .output p.subtitle { | ||
63 | - margin: 6px 8px; | ||
64 | - padding-left: 2px; | ||
65 | - font-size: 12pt; | ||
66 | - font-weight: bold; | ||
67 | - font-style: italic; | ||
68 | -} | ||
69 | - | ||
70 | -/* theme-related */ | ||
71 | -#webSockTrace .output p.subtitle { | ||
72 | - color: #626; | ||
73 | -} |
1 | -/* | ||
2 | - * Copyright 2014 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 | - | ||
17 | -/* | ||
18 | - View that traces messages across the websocket. | ||
19 | - | ||
20 | - @author Simon Hunt | ||
21 | - */ | ||
22 | - | ||
23 | -(function (onos) { | ||
24 | - 'use strict'; | ||
25 | - | ||
26 | - var v, | ||
27 | - $d, | ||
28 | - tb, | ||
29 | - out, | ||
30 | - which = 'tx', | ||
31 | - keyDispatch = { | ||
32 | - space: function () { | ||
33 | - output(which, "Simon woz 'ere... " + which); | ||
34 | - which = (which === 'tx') ? 'rx' : 'tx'; | ||
35 | - } | ||
36 | - }; | ||
37 | - | ||
38 | - | ||
39 | - function addHeader() { | ||
40 | - tb = $d.append('div') | ||
41 | - .attr('class', 'toolbar'); | ||
42 | - tb.append('span').text('Web Socket Trace'); | ||
43 | - } | ||
44 | - | ||
45 | - function addOutput() { | ||
46 | - out = $d.append('div') | ||
47 | - .attr('class', 'output'); | ||
48 | - } | ||
49 | - | ||
50 | - function subtitle(msg) { | ||
51 | - out.append('p').attr('class', 'subtitle').text(msg); | ||
52 | - } | ||
53 | - | ||
54 | - function output(rxtx, msg) { | ||
55 | - out.append('p').attr('class', rxtx).text(msg); | ||
56 | - } | ||
57 | - | ||
58 | - // invoked only the first time the view is loaded | ||
59 | - function preload(view, ctx, flags) { | ||
60 | - // NOTE: view.$div is a D3 selection of the view's div | ||
61 | - v = view; | ||
62 | - $d = v.$div; | ||
63 | - addHeader(); | ||
64 | - addOutput(); | ||
65 | - | ||
66 | - | ||
67 | - // hack for now, to allow topo access to our API | ||
68 | - // TODO: add 'exportApi' and 'importApi' to views. | ||
69 | - onos.exported.webSockTrace = { | ||
70 | - subtitle: subtitle, | ||
71 | - output: output | ||
72 | - }; | ||
73 | - } | ||
74 | - | ||
75 | - // invoked just prior to loading the view | ||
76 | - function reset(view, ctx, flags) { | ||
77 | - | ||
78 | - } | ||
79 | - | ||
80 | - // invoked when the view is loaded | ||
81 | - function load(view, ctx, flags) { | ||
82 | - resize(view, ctx, flags); | ||
83 | - view.setKeys(keyDispatch); | ||
84 | - subtitle('Waiting for messages...'); | ||
85 | - } | ||
86 | - | ||
87 | - // invoked when the view is resized | ||
88 | - function resize(view, ctx, flags) { | ||
89 | - var h = view.height(); | ||
90 | - out.style('height', h + 'px'); | ||
91 | - | ||
92 | - } | ||
93 | - | ||
94 | - // == register the view here, with links to lifecycle callbacks | ||
95 | - | ||
96 | - onos.ui.addView('webSockTrace', { | ||
97 | - preload: preload, | ||
98 | - load: load, | ||
99 | - resize: resize | ||
100 | - }); | ||
101 | - | ||
102 | -}(ONOS)); |
web/gui/src/main/webapp/ws.html
deleted
100644 → 0
1 | -<html> | ||
2 | -<head> | ||
3 | - <title>Web Sockets Demo</title> | ||
4 | - | ||
5 | - <script src="libs/jquery-2.1.1.min.js"></script> | ||
6 | - | ||
7 | - <script type='text/javascript'> | ||
8 | - if (!window.WebSocket) | ||
9 | - alert("WebSocket not supported by this browser"); | ||
10 | - | ||
11 | - var server = { | ||
12 | - connect : function() { | ||
13 | - var location = document.location.toString().replace('http://', | ||
14 | - 'ws://').replace('https://', 'wss://').replace('ws.html','ws/topology'); | ||
15 | - this.ws = new WebSocket(location); | ||
16 | - | ||
17 | - this.ws.onopen = function() { | ||
18 | - server._send("Hi there!"); | ||
19 | - }; | ||
20 | - | ||
21 | - this.ws.onmessage = function(m) { | ||
22 | - if (m.data) { | ||
23 | - $('#log').append(m.data).append($('<br/>')); | ||
24 | - } | ||
25 | - }; | ||
26 | - | ||
27 | - this.ws.onclose = function(m) { | ||
28 | - this.ws = null; | ||
29 | - }; | ||
30 | - }, | ||
31 | - | ||
32 | - _send : function(message) { | ||
33 | - if (this.ws) { | ||
34 | - this.ws.send(message); | ||
35 | - } | ||
36 | - }, | ||
37 | - | ||
38 | - send : function(text) { | ||
39 | - if (text != null && text.length > 0) { | ||
40 | - server._send(text); | ||
41 | - } | ||
42 | - } | ||
43 | - }; | ||
44 | - </script> | ||
45 | -</head> | ||
46 | -<body> | ||
47 | -<pre id='log'></pre> | ||
48 | - | ||
49 | -<script type='text/javascript'> | ||
50 | - server.connect(); | ||
51 | -</script> | ||
52 | - | ||
53 | -</body> | ||
54 | -</html> |
-
Please register or login to post a comment