GUI -- store ref to node/link selection in backing data.
- tweaking force-layout parameters; now host-to-host intent path is highlighted. - injectTestEvent() now uses recursion to look for appropriate json files. - implemented updateHost() event. - some refactoring cleanup in topo2.js Change-Id: I888f05032d3c9df6470bd4d2f399f61efb9dbd46
Showing
11 changed files
with
70 additions
and
19 deletions
1 | { | 1 | { |
2 | "event": "addLink", | 2 | "event": "addLink", |
3 | "payload": { | 3 | "payload": { |
4 | + "id": "of:0000ffffffff0003/21-of:0000ffffffff0008/20", | ||
5 | + "type": "direct", | ||
6 | + "linkWidth": 2, | ||
4 | "src": "of:0000ffffffff0003", | 7 | "src": "of:0000ffffffff0003", |
5 | "srcPort": "21", | 8 | "srcPort": "21", |
6 | "dst": "of:0000ffffffff0008", | 9 | "dst": "of:0000ffffffff0008", |
7 | "dstPort": "20", | 10 | "dstPort": "20", |
8 | - "type": "infra", | ||
9 | - "linkWidth": 2, | ||
10 | "props" : { | 11 | "props" : { |
11 | "BW": "70 G" | 12 | "BW": "70 G" |
12 | } | 13 | } | ... | ... |
1 | { | 1 | { |
2 | "event": "addHost", | 2 | "event": "addHost", |
3 | "payload": { | 3 | "payload": { |
4 | - "id": "00:00:00:00:00:03/-1", | 4 | + "id": "0E:2A:69:30:13:86/-1", |
5 | + "ingress": "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/2", | ||
6 | + "egress": "of:0000ffffffff0003/2-0E:2A:69:30:13:86/-1/0", | ||
5 | "cp": { | 7 | "cp": { |
6 | "device": "of:0000ffffffff0003", | 8 | "device": "of:0000ffffffff0003", |
7 | - "port": 1 | 9 | + "port": 2 |
8 | }, | 10 | }, |
9 | "labels": [ | 11 | "labels": [ |
10 | - "10.0.0.3", | 12 | + "unknown", |
11 | - "00:00:00:00:00:03" | 13 | + "0E:2A:69:30:13:86" |
12 | ], | 14 | ], |
13 | - "metaUi": { | 15 | + "props": {} |
14 | - } | ||
15 | } | 16 | } |
16 | } | 17 | } | ... | ... |
1 | { | 1 | { |
2 | "event": "addHost", | 2 | "event": "addHost", |
3 | "payload": { | 3 | "payload": { |
4 | - "id": "00:00:00:00:00:08/-1", | 4 | + "id": "A6:96:E5:03:52:5F/-1", |
5 | + "ingress": "A6:96:E5:03:52:5F/-1/0-of:0000ffffffff0008/1", | ||
6 | + "egress": "of:0000ffffffff0008/1-A6:96:E5:03:52:5F/-1/0", | ||
5 | "cp": { | 7 | "cp": { |
6 | "device": "of:0000ffffffff0008", | 8 | "device": "of:0000ffffffff0008", |
7 | "port": 1 | 9 | "port": 1 |
8 | }, | 10 | }, |
9 | "labels": [ | 11 | "labels": [ |
10 | - "10.0.0.8", | 12 | + "unknown", |
11 | - "00:00:00:00:00:08" | 13 | + "A6:96:E5:03:52:5F" |
12 | ], | 14 | ], |
13 | - "metaUi": { | 15 | + "props": {} |
14 | - } | ||
15 | } | 16 | } |
16 | } | 17 | } | ... | ... |
1 | +{ | ||
2 | + "event": "updateHost", | ||
3 | + "payload": { | ||
4 | + "id": "0E:2A:69:30:13:86/-1", | ||
5 | + "ingress": "0E:2A:69:30:13:86/-1/0-of:0000ffffffff0003/2", | ||
6 | + "egress": "of:0000ffffffff0003/2-0E:2A:69:30:13:86/-1/0", | ||
7 | + "cp": { | ||
8 | + "device": "of:0000ffffffff0003", | ||
9 | + "port": 2 | ||
10 | + }, | ||
11 | + "labels": [ | ||
12 | + "10.0.0.13", | ||
13 | + "0E:2A:69:30:13:86" | ||
14 | + ], | ||
15 | + "props": {} | ||
16 | + } | ||
17 | +} |
1 | +{ | ||
2 | + "event": "updateHost", | ||
3 | + "payload": { | ||
4 | + "id": "A6:96:E5:03:52:5F/-1", | ||
5 | + "ingress": "A6:96:E5:03:52:5F/-1/0-of:0000ffffffff0008/1", | ||
6 | + "egress": "of:0000ffffffff0008/1-A6:96:E5:03:52:5F/-1/0", | ||
7 | + "cp": { | ||
8 | + "device": "of:0000ffffffff0008", | ||
9 | + "port": 1 | ||
10 | + }, | ||
11 | + "labels": [ | ||
12 | + "10.0.0.17", | ||
13 | + "A6:96:E5:03:52:5F" | ||
14 | + ], | ||
15 | + "props": {} | ||
16 | + } | ||
17 | +} |
1 | { | 1 | { |
2 | "comments": [ | 2 | "comments": [ |
3 | - "Add two devices and one link (auto), and two hosts." | 3 | + "Add two devices and one link (auto), and two hosts.", |
4 | + "Then update the two hosts (with IP address labels)." | ||
4 | ], | 5 | ], |
5 | "title": "Simple Startup Scenario", | 6 | "title": "Simple Startup Scenario", |
6 | "params": { | 7 | "params": { | ... | ... |
... | @@ -53,13 +53,18 @@ | ... | @@ -53,13 +53,18 @@ |
53 | fill: #846; | 53 | fill: #846; |
54 | } | 54 | } |
55 | 55 | ||
56 | -#topo svg .node text { | 56 | +#topo svg .node.device text { |
57 | - stroke: none; | ||
58 | fill: white; | 57 | fill: white; |
59 | font: 10pt sans-serif; | 58 | font: 10pt sans-serif; |
60 | pointer-events: none; | 59 | pointer-events: none; |
61 | } | 60 | } |
62 | 61 | ||
62 | +#topo svg .node.host text { | ||
63 | + fill: #846; | ||
64 | + font: 9pt sans-serif; | ||
65 | + pointer-events: none; | ||
66 | +} | ||
67 | + | ||
63 | #topo svg .node.selected rect, | 68 | #topo svg .node.selected rect, |
64 | #topo svg .node.selected circle { | 69 | #topo svg .node.selected circle { |
65 | filter: url(#blue-glow); | 70 | filter: url(#blue-glow); |
... | @@ -73,7 +78,7 @@ | ... | @@ -73,7 +78,7 @@ |
73 | 78 | ||
74 | #topo svg .link.showPath { | 79 | #topo svg .link.showPath { |
75 | stroke: #f00; | 80 | stroke: #f00; |
76 | - stroke-width: 4px; | 81 | + stroke-width: 6px; |
77 | } | 82 | } |
78 | 83 | ||
79 | /* for debugging */ | 84 | /* for debugging */ | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment