GUI -- Created Mock WebSocket Server (runs with node.js)
- moved test scenario events to directory in test branch. Change-Id: I1f94a9b4c844be1ea2633de0c74d49ebf5a770a7
Showing
243 changed files
with
2 additions
and
442 deletions
... | @@ -30,7 +30,8 @@ | ... | @@ -30,7 +30,8 @@ |
30 | // creates a web socket for the given path, returning a "handle". | 30 | // creates a web socket for the given path, returning a "handle". |
31 | // cb is the callbacks block. | 31 | // cb is the callbacks block. |
32 | function createWebSocket(path, cb) { | 32 | function createWebSocket(path, cb) { |
33 | - var fullUrl = ufs.wsUrl(path), | 33 | + //var fullUrl = ufs.wsUrl(path), |
34 | + var fullUrl = 'ws://localhost:8123/foo', | ||
34 | ws = new WebSocket(fullUrl), | 35 | ws = new WebSocket(fullUrl), |
35 | api = { | 36 | api = { |
36 | meta: { path: fullUrl, ws: ws }, | 37 | meta: { path: fullUrl, ws: ws }, | ... | ... |
1 | -{ | ||
2 | - "event": "showTraffic", | ||
3 | - "sid": 1, | ||
4 | - "payload": { | ||
5 | - "paths": [ | ||
6 | - { | ||
7 | - "class": "secondary", | ||
8 | - "links": [ | ||
9 | - "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/101", | ||
10 | - "0E:2A:69:30:13:aa/-1/0-of:0000ffffffff0008/101" | ||
11 | - ], | ||
12 | - "labels": [ | ||
13 | - "35 bytes", | ||
14 | - "35 bytes" | ||
15 | - ] | ||
16 | - }, | ||
17 | - { | ||
18 | - "class": "secondary optical", | ||
19 | - "links": [ | ||
20 | - "of:0000ffffffff0003/4-of:0000ffffffffff03/1", | ||
21 | - "of:0000ffffffff0008/4-of:0000ffffffffff08/1", | ||
22 | - "of:0000ffffffffff08/4-of:0000ffffffffff03/1" | ||
23 | - ], | ||
24 | - "labels": [ | ||
25 | - "24 bytes", | ||
26 | - "some bits", | ||
27 | - "foo bars" | ||
28 | - ] | ||
29 | - } | ||
30 | - ] | ||
31 | - } | ||
32 | -} |
1 | -{ | ||
2 | - "event": "showTraffic", | ||
3 | - "sid": 1, | ||
4 | - "payload": { | ||
5 | - "paths": [ | ||
6 | - { | ||
7 | - "class": "animated", | ||
8 | - "traffic": true, | ||
9 | - "links": [ | ||
10 | - "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/101", | ||
11 | - "0E:2A:69:30:13:aa/-1/0-of:0000ffffffff0008/101" | ||
12 | - ], | ||
13 | - "labels": [ | ||
14 | - "47 bytes", | ||
15 | - "47 bytes" | ||
16 | - ] | ||
17 | - }, | ||
18 | - { | ||
19 | - "class": "animated optical", | ||
20 | - "traffic": true, | ||
21 | - "links": [ | ||
22 | - "of:0000ffffffff0003/4-of:0000ffffffffff03/1", | ||
23 | - "of:0000ffffffff0008/4-of:0000ffffffffff08/1", | ||
24 | - "of:0000ffffffffff08/4-of:0000ffffffffff03/1" | ||
25 | - ], | ||
26 | - "labels": [ | ||
27 | - "24 bytes", | ||
28 | - "some bits", | ||
29 | - "foo bars" | ||
30 | - ] | ||
31 | - } | ||
32 | - ] | ||
33 | - } | ||
34 | -} |
1 | -{ | ||
2 | - "event": "showTraffic", | ||
3 | - "sid": 1, | ||
4 | - "payload": { | ||
5 | - "paths": [ | ||
6 | - { | ||
7 | - "class": "primary", | ||
8 | - "traffic": false, | ||
9 | - "links": [ | ||
10 | - "of:0000ffffffff0008/2-of:0000ffffffff0003/1" | ||
11 | - ], | ||
12 | - "labels": [""] | ||
13 | - }, | ||
14 | - { | ||
15 | - "class": "secondary", | ||
16 | - "traffic": false, | ||
17 | - "links": [ | ||
18 | - "of:0000ffffffff0003/9-of:0000ffffffff0007/2" | ||
19 | - ], | ||
20 | - "labels": [""] | ||
21 | - }, | ||
22 | - { | ||
23 | - "class": "animated", | ||
24 | - "traffic": true, | ||
25 | - "links": [ | ||
26 | - "of:0000ffffffff0008/4-of:0000ffffffff0007/1" | ||
27 | - ], | ||
28 | - "labels": [""] | ||
29 | - }, | ||
30 | - { | ||
31 | - "class": "animated optical", | ||
32 | - "traffic": true, | ||
33 | - "links": [ | ||
34 | - "of:0000ffffffff0008/4-of:0000ffffffffff08/1" | ||
35 | - ], | ||
36 | - "labels": [""] | ||
37 | - }, | ||
38 | - { | ||
39 | - "class": "secondary optical", | ||
40 | - "traffic": false, | ||
41 | - "links": [ | ||
42 | - "of:0000ffffffff0003/4-of:0000ffffffffff03/1" | ||
43 | - ], | ||
44 | - "labels": [""] | ||
45 | - }, | ||
46 | - { | ||
47 | - "class": "primary optical", | ||
48 | - "traffic": false, | ||
49 | - "links": [ | ||
50 | - "of:0000ffffffffff08/4-of:0000ffffffffff03/1" | ||
51 | - ], | ||
52 | - "labels": [""] | ||
53 | - } | ||
54 | - ] | ||
55 | - } | ||
56 | -} |
1 | -{ | ||
2 | - "event": "removeHost", | ||
3 | - "payload": { | ||
4 | - "id": "0E:2A:69:30:13:88/-1", | ||
5 | - "ingress": "0E:2A:69:30:13:88/-1/0-of:0000ffffffff0007/101", | ||
6 | - "egress": "of:0000ffffffff0007/101-0E:2A:69:30:13:86/-1/0", | ||
7 | - "cp": { | ||
8 | - "device": "of:0000ffffffff0007", | ||
9 | - "port": 101 | ||
10 | - }, | ||
11 | - "labels": [ | ||
12 | - "4.5.7.6", | ||
13 | - "0E:2A:69:30:13:88" | ||
14 | - ], | ||
15 | - "props": {} | ||
16 | - } | ||
17 | -} |
1 | -{ | ||
2 | - "event": "addLink", | ||
3 | - "payload": { | ||
4 | - "id": "of:0000ffffffff0003/9-of:0000ffffffff0007/2", | ||
5 | - "type": "direct", | ||
6 | - "online": true, | ||
7 | - "linkWidth": 2, | ||
8 | - "src": "of:0000ffffffff0003", | ||
9 | - "srcPort": "9", | ||
10 | - "dst": "of:0000ffffffff0007", | ||
11 | - "dstPort": "2", | ||
12 | - "props" : { | ||
13 | - "BW": "120 Gb" | ||
14 | - } | ||
15 | - } | ||
16 | -} |
1 | -{ | ||
2 | - "event": "addLink", | ||
3 | - "payload": { | ||
4 | - "id": "of:0000ffffffff0008/2-of:0000ffffffff0003/1", | ||
5 | - "type": "direct", | ||
6 | - "online": true, | ||
7 | - "linkWidth": 2, | ||
8 | - "src": "of:0000ffffffff0008", | ||
9 | - "srcPort": "2", | ||
10 | - "dst": "of:0000ffffffff0003", | ||
11 | - "dstPort": "1", | ||
12 | - "props" : { | ||
13 | - "BW": "70 Gb" | ||
14 | - } | ||
15 | - } | ||
16 | -} |
1 | -{ | ||
2 | - "event": "addLink", | ||
3 | - "payload": { | ||
4 | - "id": "of:0000ffffffff0008/4-of:0000ffffffff0007/1", | ||
5 | - "type": "direct", | ||
6 | - "online": true, | ||
7 | - "linkWidth": 2, | ||
8 | - "src": "of:0000ffffffff0008", | ||
9 | - "srcPort": "4", | ||
10 | - "dst": "of:0000ffffffff0007", | ||
11 | - "dstPort": "1", | ||
12 | - "props" : { | ||
13 | - "BW": "90 Gb" | ||
14 | - } | ||
15 | - } | ||
16 | -} |
1 | -{ | ||
2 | - "event": "addLink", | ||
3 | - "payload": { | ||
4 | - "id": "of:0000ffffffff0008/4-of:0000ffffffffff08/1", | ||
5 | - "type": "direct", | ||
6 | - "online": true, | ||
7 | - "linkWidth": 2, | ||
8 | - "src": "of:0000ffffffff0008", | ||
9 | - "srcPort": "4", | ||
10 | - "dst": "of:0000ffffffffff08", | ||
11 | - "dstPort": "1", | ||
12 | - "props" : { | ||
13 | - "BW": "90 Gb" | ||
14 | - } | ||
15 | - } | ||
16 | -} |
1 | -{ | ||
2 | - "comments": [ | ||
3 | - "Stepping through showTraffic" | ||
4 | - ], | ||
5 | - "title": "Show Traffic Scenario", | ||
6 | - "params": { | ||
7 | - "lastAuto": 14 | ||
8 | - }, | ||
9 | - "description": [ | ||
10 | - "Figure out primary, secondary and animated link visualizations.", | ||
11 | - "", | ||
12 | - "Press 'H' to show hosts.", | ||
13 | - "", | ||
14 | - "Press '=' to load initial events.", | ||
15 | - "Press '-' to fire further events." | ||
16 | - ] | ||
17 | -} |
1 | -see: http://bost.ocks.org/mike/map/ | ||
2 | - | ||
3 | -brew install gdal | ||
4 | -npm install -g topojson | ||
5 | - | ||
6 | -To generate continental US map: | ||
7 | - | ||
8 | - $ wget 'http://www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_1_states_provinces_lakes.zip' | ||
9 | - $ unzip ne_50m_admin_1_states_provinces_lakes.zip | ||
10 | - $ ogr2ogr -f GeoJSON -where "sr_adm0_a3 IN ('USA')" states.json ne_50m_admin_1_states_provinces_lakes.shp | ||
11 | - | ||
12 | -edit states.json to remove data for Hawaii and Alaska | ||
13 | - | ||
14 | - $ topojson states.json > topology.json | ||
15 | - | ||
16 | - | ||
17 | -The .shp file above is incomplete (USA and part of Candada.) | ||
18 | -So it may be that each region requires a bit of research to generate. | ||
19 | -Ideally a source for public domain shp files can be found that covers all geographic regions. | ||
20 | - | ||
21 | - | ||
22 | -For Canada: | ||
23 | - | ||
24 | - # wget 'http://www12.statcan.gc.ca/census-recensement/2011/geo/bound-limit/files-fichiers/gpr_000b11a_e.zip' | ||
25 | - # unzip gpr_000b11a_e.zip | ||
26 | - # ogr2ogr -f "GeoJSON" -s_srs EPSG:21781 -t_srs EPSG:4326 canada.json gpr_000b11a_e.shp | ||
27 | - # topojson --id-property CFSAUID -p name=PRNAME -p name canada.json > topology.json | ||
28 | - | ||
29 | - | ||
30 | -This produces a very large (5MB) file and draws very slowly in Chrome. | ||
31 | -So some additional processing is required to simplify the geometry. (It is not checked in.) | ||
32 | - | ||
33 | -Also, the specification of object structure within the geojson is unclear. | ||
34 | -In the US map the geojson structure is | ||
35 | - | ||
36 | - json.objects.states | ||
37 | - | ||
38 | -but in the Canadian data it's | ||
39 | - | ||
40 | - json.objects.canada | ||
41 | - | ||
42 | - | ||
43 | -Lastly, the projection that is used may be tailored to the region. | ||
44 | -The preferred projection for the US is "albers" and d3 provides a "albersUSA" which can be used to | ||
45 | - project hawaii and alaska as well | ||
46 | - | ||
47 | -For Canada, apparantly a "Lambert" projection (called conicConformal in d3) is preferred | ||
48 | - | ||
49 | -see: | ||
50 | - https://github.com/mbostock/d3/wiki/Geo-Projections | ||
51 | - http://www.statcan.gc.ca/pub/92-195-x/2011001/other-autre/mapproj-projcarte/m-c-eng.htm | ||
52 | - | ||
53 | - | ||
54 | -Summary: | ||
55 | -- some additional work is required to fully generalize maps functionality. | ||
56 | -- it may be worthwhile for ON.LAB to provide the topo files for key regions since producing these | ||
57 | - files is non-trivial | ||
58 | - | ||
59 | - | ||
60 | - | ||
61 | - |
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
web/gui/src/main/webapp/json/ev/links/scenario.json
→
web/gui/src/test/_karma/ev/links/scenario.json
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
web/gui/src/test/_karma/wssrv.js
0 → 100644
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment