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
Showing
14 changed files
with
158 additions
and
4 deletions
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | "payload": { | 3 | "payload": { |
| 4 | "id": "of:0000000000000007/4-of:0000000000000006/1", | 4 | "id": "of:0000000000000007/4-of:0000000000000006/1", |
| 5 | "type": "direct", | 5 | "type": "direct", |
| 6 | + "online": true, | ||
| 6 | "linkWidth": 2, | 7 | "linkWidth": 2, |
| 7 | "src": "of:0000000000000007", | 8 | "src": "of:0000000000000007", |
| 8 | "srcPort": "4", | 9 | "srcPort": "4", | ... | ... |
| 1 | +{ | ||
| 2 | + "event": "showTraffic", | ||
| 3 | + "sid":63, | ||
| 4 | + "payload": { | ||
| 5 | + "paths": [ | ||
| 6 | + { | ||
| 7 | + "class": "primary", | ||
| 8 | + "traffic": false, | ||
| 9 | + "links": [ | ||
| 10 | + "1E:10:D9:A2:84:E2/-1/0-of:0000000000000003/1", | ||
| 11 | + "of:0000000000000003/4-of:0000000000000002/1", | ||
| 12 | + "of:0000000000000002/4-of:0000000000000001/1", | ||
| 13 | + "of:0000000000000001/2-of:0000000000000006/4", | ||
| 14 | + "of:0000000000000006/2-of:0000000000000008/4", | ||
| 15 | + "of:0000000000000008/3-9E:0B:E0:38:98:DE/-1/0" | ||
| 16 | + ], | ||
| 17 | + "labels": [ | ||
| 18 | + "", | ||
| 19 | + "", | ||
| 20 | + "", | ||
| 21 | + "", | ||
| 22 | + "", | ||
| 23 | + "" | ||
| 24 | + ] | ||
| 25 | + }, | ||
| 26 | + { | ||
| 27 | + "class": "primary", | ||
| 28 | + "traffic": false, | ||
| 29 | + "links": [ | ||
| 30 | + "9E:0B:E0:38:98:DE/-1/0-of:0000000000000008/3", | ||
| 31 | + "of:0000000000000008/4-of:0000000000000006/2", | ||
| 32 | + "of:0000000000000006/4-of:0000000000000001/2", | ||
| 33 | + "of:0000000000000001/1-of:0000000000000002/4", | ||
| 34 | + "of:0000000000000002/1-of:0000000000000003/4", | ||
| 35 | + "of:0000000000000003/1-1E:10:D9:A2:84:E2/-1/0" | ||
| 36 | + ], | ||
| 37 | + "labels": [ | ||
| 38 | + "", | ||
| 39 | + "", | ||
| 40 | + "", | ||
| 41 | + "", | ||
| 42 | + "", | ||
| 43 | + "" | ||
| 44 | + ] | ||
| 45 | + } | ||
| 46 | + ] | ||
| 47 | + } | ||
| 48 | +} |
| 1 | +{ | ||
| 2 | + "event": "showTraffic", | ||
| 3 | + "sid": 227, | ||
| 4 | + "payload": { | ||
| 5 | + "paths": [ | ||
| 6 | + { | ||
| 7 | + "class": "primary animated", | ||
| 8 | + "traffic": true, | ||
| 9 | + "links": [ | ||
| 10 | + "02:D7:91:9F:4B:E8/-1/0-of:0000000000000004/1", | ||
| 11 | + "of:0000000000000004/4-of:0000000000000002/2", | ||
| 12 | + "of:0000000000000002/4-of:0000000000000001/1", | ||
| 13 | + "of:0000000000000001/2-of:0000000000000006/4", | ||
| 14 | + "of:0000000000000006/2-of:0000000000000008/4", | ||
| 15 | + "of:0000000000000008/3-9E:0B:E0:38:98:DE/-1/0" | ||
| 16 | + ], | ||
| 17 | + "labels": [ | ||
| 18 | + "", | ||
| 19 | + "Load{rate=98, latest=37898}", | ||
| 20 | + "", | ||
| 21 | + "", | ||
| 22 | + "", | ||
| 23 | + "Load{rate=98, latest=38080}" | ||
| 24 | + ] | ||
| 25 | + }, | ||
| 26 | + { | ||
| 27 | + "class": "primary animated", | ||
| 28 | + "traffic": true, | ||
| 29 | + "links": [ | ||
| 30 | + "9E:0B:E0:38:98:DE/-1/0-of:0000000000000008/3", | ||
| 31 | + "of:0000000000000008/4-of:0000000000000006/2", | ||
| 32 | + "of:0000000000000006/4-of:0000000000000001/2", | ||
| 33 | + "of:0000000000000001/1-of:0000000000000002/4", | ||
| 34 | + "of:0000000000000002/2-of:0000000000000004/4", | ||
| 35 | + "of:0000000000000004/1-02:D7:91:9F:4B:E8/-1/0" | ||
| 36 | + ], | ||
| 37 | + "labels": [ | ||
| 38 | + "", | ||
| 39 | + "", | ||
| 40 | + "Load{rate=98, latest=38178}", | ||
| 41 | + "", | ||
| 42 | + "Load{rate=98, latest=37898}", | ||
| 43 | + "Load{rate=98, latest=37898}" | ||
| 44 | + ] | ||
| 45 | + }, | ||
| 46 | + { | ||
| 47 | + "class": "primary animated", | ||
| 48 | + "traffic": true, | ||
| 49 | + "links": [ | ||
| 50 | + "1E:10:D9:A2:84:E2/-1/0-of:0000000000000003/1", | ||
| 51 | + "of:0000000000000003/4-of:0000000000000002/1", | ||
| 52 | + "of:0000000000000002/4-of:0000000000000001/1", | ||
| 53 | + "of:0000000000000001/2-of:0000000000000006/4", | ||
| 54 | + "of:0000000000000006/2-of:0000000000000008/4", | ||
| 55 | + "of:0000000000000008/3-9E:0B:E0:38:98:DE/-1/0" | ||
| 56 | + ], | ||
| 57 | + "labels": [ | ||
| 58 | + "", | ||
| 59 | + "", | ||
| 60 | + "", | ||
| 61 | + "", | ||
| 62 | + "", | ||
| 63 | + "Load{rate=98, latest=38080}" | ||
| 64 | + ] | ||
| 65 | + }, | ||
| 66 | + { | ||
| 67 | + "class": "primary animated", | ||
| 68 | + "traffic": true, | ||
| 69 | + "links": [ | ||
| 70 | + "9E:0B:E0:38:98:DE/-1/0-of:0000000000000008/3", | ||
| 71 | + "of:0000000000000008/4-of:0000000000000006/2", | ||
| 72 | + "of:0000000000000006/4-of:0000000000000001/2", | ||
| 73 | + "of:0000000000000001/1-of:0000000000000002/4", | ||
| 74 | + "of:0000000000000002/1-of:0000000000000003/4", | ||
| 75 | + "of:0000000000000003/1-1E:10:D9:A2:84:E2/-1/0" | ||
| 76 | + ], | ||
| 77 | + "labels": [ | ||
| 78 | + "", | ||
| 79 | + "", | ||
| 80 | + "Load{rate=98, latest=38178}", | ||
| 81 | + "", | ||
| 82 | + "", | ||
| 83 | + "" | ||
| 84 | + ] | ||
| 85 | + } | ||
| 86 | + ] | ||
| 87 | + } | ||
| 88 | +} |
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | "payload": { | 3 | "payload": { |
| 4 | "id": "of:0000ffffffff0003/4-of:0000ffffffffff03/1", | 4 | "id": "of:0000ffffffff0003/4-of:0000ffffffffff03/1", |
| 5 | "type": "direct", | 5 | "type": "direct", |
| 6 | + "online": true, | ||
| 6 | "linkWidth": 2, | 7 | "linkWidth": 2, |
| 7 | "src": "of:0000ffffffff0003", | 8 | "src": "of:0000ffffffff0003", |
| 8 | "srcPort": "4", | 9 | "srcPort": "4", | ... | ... |
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | "payload": { | 3 | "payload": { |
| 4 | "id": "of:0000ffffffffff08/4-of:0000ffffffffff03/1", | 4 | "id": "of:0000ffffffffff08/4-of:0000ffffffffff03/1", |
| 5 | "type": "direct", | 5 | "type": "direct", |
| 6 | + "online": true, | ||
| 6 | "linkWidth": 2, | 7 | "linkWidth": 2, |
| 7 | "src": "of:0000ffffffffff08", | 8 | "src": "of:0000ffffffffff08", |
| 8 | "srcPort": "4", | 9 | "srcPort": "4", | ... | ... |
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | "payload": { | 3 | "payload": { |
| 4 | "id": "of:0000ffffffff0003/9-of:0000ffffffff0007/2", | 4 | "id": "of:0000ffffffff0003/9-of:0000ffffffff0007/2", |
| 5 | "type": "direct", | 5 | "type": "direct", |
| 6 | + "online": true, | ||
| 6 | "linkWidth": 2, | 7 | "linkWidth": 2, |
| 7 | "src": "of:0000ffffffff0003", | 8 | "src": "of:0000ffffffff0003", |
| 8 | "srcPort": "9", | 9 | "srcPort": "9", | ... | ... |
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | "payload": { | 3 | "payload": { |
| 4 | "id": "of:0000ffffffff0008/2-of:0000ffffffff0003/1", | 4 | "id": "of:0000ffffffff0008/2-of:0000ffffffff0003/1", |
| 5 | "type": "direct", | 5 | "type": "direct", |
| 6 | + "online": true, | ||
| 6 | "linkWidth": 2, | 7 | "linkWidth": 2, |
| 7 | "src": "of:0000ffffffff0008", | 8 | "src": "of:0000ffffffff0008", |
| 8 | "srcPort": "2", | 9 | "srcPort": "2", | ... | ... |
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | "payload": { | 3 | "payload": { |
| 4 | "id": "of:0000ffffffff0008/4-of:0000ffffffff0007/1", | 4 | "id": "of:0000ffffffff0008/4-of:0000ffffffff0007/1", |
| 5 | "type": "direct", | 5 | "type": "direct", |
| 6 | + "online": true, | ||
| 6 | "linkWidth": 2, | 7 | "linkWidth": 2, |
| 7 | "src": "of:0000ffffffff0008", | 8 | "src": "of:0000ffffffff0008", |
| 8 | "srcPort": "4", | 9 | "srcPort": "4", | ... | ... |
| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | "payload": { | 3 | "payload": { |
| 4 | "id": "of:0000ffffffff0008/4-of:0000ffffffffff08/1", | 4 | "id": "of:0000ffffffff0008/4-of:0000ffffffffff08/1", |
| 5 | "type": "direct", | 5 | "type": "direct", |
| 6 | + "online": true, | ||
| 6 | "linkWidth": 2, | 7 | "linkWidth": 2, |
| 7 | "src": "of:0000ffffffff0008", | 8 | "src": "of:0000ffffffff0008", |
| 8 | "srcPort": "4", | 9 | "srcPort": "4", | ... | ... |
| ... | @@ -526,7 +526,7 @@ | ... | @@ -526,7 +526,7 @@ |
| 526 | 526 | ||
| 527 | function logicError(msg) { | 527 | function logicError(msg) { |
| 528 | // TODO, report logic error to server, via websock, so it can be logged | 528 | // TODO, report logic error to server, via websock, so it can be logged |
| 529 | - network.view.alert('Logic Error:\n\n' + msg); | 529 | + //network.view.alert('Logic Error:\n\n' + msg); |
| 530 | console.warn(msg); | 530 | console.warn(msg); |
| 531 | } | 531 | } |
| 532 | 532 | ... | ... |
-
Please register or login to post a comment