From cb56cffbe2e6fd8830552604de7f2cb7dc795816 Mon Sep 17 00:00:00 2001 From: Simon Hunt Date: Mon, 17 Nov 2014 11:42:26 -0800 Subject: [PATCH] GUI - Added example requestTraffic and showTraffic events; updated test addLink events. - commented out using 'alert' for logic errors (console warn only now). Change-Id: I3a48107c5707fd41d8e69ae7c1a980e498651c4b --- .../json/ev/_capture/rx/addLink_ex1.json | 1 + .../json/ev/_capture/rx/showTraffic_ex1.json | 48 ++++++++++ .../_capture/rx/showTraffic_ex2_animated.json | 88 +++++++++++++++++++ .../_capture/tx/requestTraffic_ex1_devs.json | 3 +- .../_capture/tx/requestTraffic_ex2_hosts.json | 3 +- .../tx/requestTraffic_ex3_devs_hosts.json | 3 +- .../_capture/tx/requestTraffic_ex4_hover.json | 8 ++ .../webapp/json/ev/traffic/ev_10_onos.json | 1 + .../webapp/json/ev/traffic/ev_11_onos.json | 1 + .../webapp/json/ev/traffic/ev_6_onos.json | 1 + .../webapp/json/ev/traffic/ev_7_onos.json | 1 + .../webapp/json/ev/traffic/ev_8_onos.json | 1 + .../webapp/json/ev/traffic/ev_9_onos.json | 1 + web/gui/src/main/webapp/topo2.js | 2 +- 14 files changed, 158 insertions(+), 4 deletions(-) create mode 100644 web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex1.json create mode 100644 web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex2_animated.json create mode 100644 web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex4_hover.json diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json index 92c784816a..f48147fc6c 100644 --- a/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json +++ b/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json @@ -3,6 +3,7 @@ "payload": { "id": "of:0000000000000007/4-of:0000000000000006/1", "type": "direct", + "online": true, "linkWidth": 2, "src": "of:0000000000000007", "srcPort": "4", diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex1.json new file mode 100644 index 0000000000..bed7cdd086 --- /dev/null +++ b/web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex1.json @@ -0,0 +1,48 @@ +{ + "event": "showTraffic", + "sid":63, + "payload": { + "paths": [ + { + "class": "primary", + "traffic": false, + "links": [ + "1E:10:D9:A2:84:E2/-1/0-of:0000000000000003/1", + "of:0000000000000003/4-of:0000000000000002/1", + "of:0000000000000002/4-of:0000000000000001/1", + "of:0000000000000001/2-of:0000000000000006/4", + "of:0000000000000006/2-of:0000000000000008/4", + "of:0000000000000008/3-9E:0B:E0:38:98:DE/-1/0" + ], + "labels": [ + "", + "", + "", + "", + "", + "" + ] + }, + { + "class": "primary", + "traffic": false, + "links": [ + "9E:0B:E0:38:98:DE/-1/0-of:0000000000000008/3", + "of:0000000000000008/4-of:0000000000000006/2", + "of:0000000000000006/4-of:0000000000000001/2", + "of:0000000000000001/1-of:0000000000000002/4", + "of:0000000000000002/1-of:0000000000000003/4", + "of:0000000000000003/1-1E:10:D9:A2:84:E2/-1/0" + ], + "labels": [ + "", + "", + "", + "", + "", + "" + ] + } + ] + } +} diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex2_animated.json b/web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex2_animated.json new file mode 100644 index 0000000000..610b516c8e --- /dev/null +++ b/web/gui/src/main/webapp/json/ev/_capture/rx/showTraffic_ex2_animated.json @@ -0,0 +1,88 @@ +{ + "event": "showTraffic", + "sid": 227, + "payload": { + "paths": [ + { + "class": "primary animated", + "traffic": true, + "links": [ + "02:D7:91:9F:4B:E8/-1/0-of:0000000000000004/1", + "of:0000000000000004/4-of:0000000000000002/2", + "of:0000000000000002/4-of:0000000000000001/1", + "of:0000000000000001/2-of:0000000000000006/4", + "of:0000000000000006/2-of:0000000000000008/4", + "of:0000000000000008/3-9E:0B:E0:38:98:DE/-1/0" + ], + "labels": [ + "", + "Load{rate=98, latest=37898}", + "", + "", + "", + "Load{rate=98, latest=38080}" + ] + }, + { + "class": "primary animated", + "traffic": true, + "links": [ + "9E:0B:E0:38:98:DE/-1/0-of:0000000000000008/3", + "of:0000000000000008/4-of:0000000000000006/2", + "of:0000000000000006/4-of:0000000000000001/2", + "of:0000000000000001/1-of:0000000000000002/4", + "of:0000000000000002/2-of:0000000000000004/4", + "of:0000000000000004/1-02:D7:91:9F:4B:E8/-1/0" + ], + "labels": [ + "", + "", + "Load{rate=98, latest=38178}", + "", + "Load{rate=98, latest=37898}", + "Load{rate=98, latest=37898}" + ] + }, + { + "class": "primary animated", + "traffic": true, + "links": [ + "1E:10:D9:A2:84:E2/-1/0-of:0000000000000003/1", + "of:0000000000000003/4-of:0000000000000002/1", + "of:0000000000000002/4-of:0000000000000001/1", + "of:0000000000000001/2-of:0000000000000006/4", + "of:0000000000000006/2-of:0000000000000008/4", + "of:0000000000000008/3-9E:0B:E0:38:98:DE/-1/0" + ], + "labels": [ + "", + "", + "", + "", + "", + "Load{rate=98, latest=38080}" + ] + }, + { + "class": "primary animated", + "traffic": true, + "links": [ + "9E:0B:E0:38:98:DE/-1/0-of:0000000000000008/3", + "of:0000000000000008/4-of:0000000000000006/2", + "of:0000000000000006/4-of:0000000000000001/2", + "of:0000000000000001/1-of:0000000000000002/4", + "of:0000000000000002/1-of:0000000000000003/4", + "of:0000000000000003/1-1E:10:D9:A2:84:E2/-1/0" + ], + "labels": [ + "", + "", + "Load{rate=98, latest=38178}", + "", + "", + "" + ] + } + ] + } +} diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex1_devs.json b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex1_devs.json index 725c15f536..5c00b7100e 100644 --- a/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex1_devs.json +++ b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex1_devs.json @@ -6,6 +6,7 @@ "of:0000000000000007", "of:000000000000000c", "of:000000000000000a" - ] + ], + "hover": "" } } diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex2_hosts.json b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex2_hosts.json index 84f17dfbd3..3d7bb2dc76 100644 --- a/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex2_hosts.json +++ b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex2_hosts.json @@ -7,6 +7,7 @@ "22:BA:28:81:FD:45/-1", "BA:91:F6:8E:B6:B6/-1", "06:E2:E6:F7:03:12/-1" - ] + ], + "hover": "" } } diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex3_devs_hosts.json b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex3_devs_hosts.json index 3f915dfb67..1757b443f3 100644 --- a/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex3_devs_hosts.json +++ b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex3_devs_hosts.json @@ -7,6 +7,7 @@ "86:C3:7B:90:79:CD/-1", "7E:D2:EE:0F:12:4A/-1", "of:000000000000000c" - ] + ], + "hover": "" } } diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex4_hover.json b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex4_hover.json new file mode 100644 index 0000000000..b86e03aa1f --- /dev/null +++ b/web/gui/src/main/webapp/json/ev/_capture/tx/requestTraffic_ex4_hover.json @@ -0,0 +1,8 @@ +{ + "event": "requestTraffic", + "sid": 48, + "payload": { + "ids": [], + "hover": "9E:0B:E0:38:98:DE/-1" + } +} diff --git a/web/gui/src/main/webapp/json/ev/traffic/ev_10_onos.json b/web/gui/src/main/webapp/json/ev/traffic/ev_10_onos.json index b25604d02e..ae7c2abe13 100644 --- a/web/gui/src/main/webapp/json/ev/traffic/ev_10_onos.json +++ b/web/gui/src/main/webapp/json/ev/traffic/ev_10_onos.json @@ -3,6 +3,7 @@ "payload": { "id": "of:0000ffffffff0003/4-of:0000ffffffffff03/1", "type": "direct", + "online": true, "linkWidth": 2, "src": "of:0000ffffffff0003", "srcPort": "4", diff --git a/web/gui/src/main/webapp/json/ev/traffic/ev_11_onos.json b/web/gui/src/main/webapp/json/ev/traffic/ev_11_onos.json index 2939f35041..2866f3fe53 100644 --- a/web/gui/src/main/webapp/json/ev/traffic/ev_11_onos.json +++ b/web/gui/src/main/webapp/json/ev/traffic/ev_11_onos.json @@ -3,6 +3,7 @@ "payload": { "id": "of:0000ffffffffff08/4-of:0000ffffffffff03/1", "type": "direct", + "online": true, "linkWidth": 2, "src": "of:0000ffffffffff08", "srcPort": "4", diff --git a/web/gui/src/main/webapp/json/ev/traffic/ev_6_onos.json b/web/gui/src/main/webapp/json/ev/traffic/ev_6_onos.json index 70dc216cc8..00583d4dd4 100644 --- a/web/gui/src/main/webapp/json/ev/traffic/ev_6_onos.json +++ b/web/gui/src/main/webapp/json/ev/traffic/ev_6_onos.json @@ -3,6 +3,7 @@ "payload": { "id": "of:0000ffffffff0003/9-of:0000ffffffff0007/2", "type": "direct", + "online": true, "linkWidth": 2, "src": "of:0000ffffffff0003", "srcPort": "9", diff --git a/web/gui/src/main/webapp/json/ev/traffic/ev_7_onos.json b/web/gui/src/main/webapp/json/ev/traffic/ev_7_onos.json index 78e6a394e9..3fd1352206 100644 --- a/web/gui/src/main/webapp/json/ev/traffic/ev_7_onos.json +++ b/web/gui/src/main/webapp/json/ev/traffic/ev_7_onos.json @@ -3,6 +3,7 @@ "payload": { "id": "of:0000ffffffff0008/2-of:0000ffffffff0003/1", "type": "direct", + "online": true, "linkWidth": 2, "src": "of:0000ffffffff0008", "srcPort": "2", diff --git a/web/gui/src/main/webapp/json/ev/traffic/ev_8_onos.json b/web/gui/src/main/webapp/json/ev/traffic/ev_8_onos.json index d9d27e7049..e6206d7eca 100644 --- a/web/gui/src/main/webapp/json/ev/traffic/ev_8_onos.json +++ b/web/gui/src/main/webapp/json/ev/traffic/ev_8_onos.json @@ -3,6 +3,7 @@ "payload": { "id": "of:0000ffffffff0008/4-of:0000ffffffff0007/1", "type": "direct", + "online": true, "linkWidth": 2, "src": "of:0000ffffffff0008", "srcPort": "4", diff --git a/web/gui/src/main/webapp/json/ev/traffic/ev_9_onos.json b/web/gui/src/main/webapp/json/ev/traffic/ev_9_onos.json index 8437c2113a..e28d57578d 100644 --- a/web/gui/src/main/webapp/json/ev/traffic/ev_9_onos.json +++ b/web/gui/src/main/webapp/json/ev/traffic/ev_9_onos.json @@ -3,6 +3,7 @@ "payload": { "id": "of:0000ffffffff0008/4-of:0000ffffffffff08/1", "type": "direct", + "online": true, "linkWidth": 2, "src": "of:0000ffffffff0008", "srcPort": "4", diff --git a/web/gui/src/main/webapp/topo2.js b/web/gui/src/main/webapp/topo2.js index 0d84125171..a2dfbeab1a 100644 --- a/web/gui/src/main/webapp/topo2.js +++ b/web/gui/src/main/webapp/topo2.js @@ -526,7 +526,7 @@ function logicError(msg) { // TODO, report logic error to server, via websock, so it can be logged - network.view.alert('Logic Error:\n\n' + msg); + //network.view.alert('Logic Error:\n\n' + msg); console.warn(msg); }