Added sample switch data, and augmented selection logic to fetch the detail data from the server.
Also used styled table for displaying properties.
diff --git a/web/gui/src/main/webapp/json/network.json b/web/gui/src/main/webapp/json/network.json
new file mode 100644
index 0000000..eacb01c
--- /dev/null
+++ b/web/gui/src/main/webapp/json/network.json
@@ -0,0 +1,163 @@
+{
+ "meta": {
+ "comments": [
+ "This is sample data for developing the ONOS UI (network view)",
+ " in a standalone mode (no server required).",
+ " Eventually, we will wire this up to live data",
+ " from the server, via a websocket.",
+ "",
+ "Note that this is just a first-draft of the data --",
+ " additional fields will be added when they are needed."
+ ],
+ "otherMetaData": "can go here..."
+ },
+ "devices": [
+ {
+ "id": "of:0000000000000001",
+ "labels": ["00:00:00:00:00:00:00:01", "SFO-W10", "opt-1"],
+ "type": "roadm"
+ },
+ {
+ "id": "of:0000000000000002",
+ "labels": ["00:00:00:00:00:00:00:02", "SJC-W10", "opt-2"],
+ "type": "roadm"
+ },
+ {
+ "id": "of:0000000000000003",
+ "labels": ["00:00:00:00:00:00:00:03", "LAX-W10", "opt-3"],
+ "type": "roadm"
+ },
+ {
+ "id": "of:0000000000000004",
+ "labels": ["00:00:00:00:00:00:00:04", "SDG-W10", "opt-4"],
+ "type": "roadm"
+ },
+ {
+ "id": "of:0000000000000011",
+ "labels": ["00:00:00:00:00:00:00:11", "SFO-pkt", "pkt-11"],
+ "type": "switch"
+ },
+ {
+ "id": "of:0000000000000012",
+ "labels": ["00:00:00:00:00:00:00:12", "SJC-pkt", "pkt-12"],
+ "type": "switch"
+ },
+ {
+ "id": "of:0000000000000013",
+ "labels": ["00:00:00:00:00:00:00:13", "LAX-pkt", "pkt-13"],
+ "type": "switch"
+ }
+ ],
+ "linkNotes": [
+ "even though we have 'directionality' (src/dst), each link is",
+ " considered to be bi-directional. Note that links between hosts",
+ " and edge switches are inferred from host information, and not",
+ " explicitly represented here."
+ ],
+ "links": [
+ {
+ "src": "of:0000000000000001",
+ "dst": "of:0000000000000002",
+ "type": "optical",
+ "linkWidth": 1.5
+ },
+ {
+ "src": "of:0000000000000001",
+ "dst": "of:0000000000000003",
+ "type": "optical",
+ "linkWidth": 1.5
+ },
+ {
+ "src": "of:0000000000000001",
+ "dst": "of:0000000000000004",
+ "type": "optical",
+ "linkWidth": 1.5
+ },
+ {
+ "src": "of:0000000000000002",
+ "dst": "of:0000000000000003",
+ "type": "optical",
+ "linkWidth": 1.5
+ },
+ {
+ "src": "of:0000000000000002",
+ "dst": "of:0000000000000004",
+ "type": "optical",
+ "linkWidth": 1.5
+ },
+ {
+ "src": "of:0000000000000003",
+ "dst": "of:0000000000000004",
+ "type": "optical",
+ "linkWidth": 1.5
+ },
+ {
+ "src": "of:0000000000000013",
+ "dst": "of:0000000000000003",
+ "type": "direct",
+ "linkWidth": 1.0
+ },
+ {
+ "src": "of:0000000000000012",
+ "dst": "of:0000000000000002",
+ "type": "direct",
+ "linkWidth": 1.0
+ },
+ {
+ "src": "of:0000000000000011",
+ "dst": "of:0000000000000001",
+ "type": "direct",
+ "linkWidth": 1.0
+ }
+ ],
+ "hosts": [
+ {
+ "id": "00:60:d3:00:11:01/7",
+ "labels": ["00:60:d3:00:11:01/7", "Host-11-A"],
+ "cp" : {
+ "device": "of:0000000000000011",
+ "port": 6
+ }
+ },
+ {
+ "id": "00:60:d3:00:11:02/7",
+ "labels": ["00:60:d3:00:11:02/7", "Host-11-B"],
+ "cp" : {
+ "device": "of:0000000000000011",
+ "port": 8
+ }
+ },
+ {
+ "id": "00:60:d3:00:12:01/4",
+ "labels": ["00:60:d3:00:12:01/4", "Host-12-C"],
+ "cp" : {
+ "device": "of:0000000000000012",
+ "port": 12
+ }
+ },
+ {
+ "id": "00:60:d3:00:12:02/4",
+ "labels": ["00:60:d3:00:12:02/4", "Host-12-D"],
+ "cp" : {
+ "device": "of:0000000000000012",
+ "port": 13
+ }
+ },
+ {
+ "id": "00:60:d3:00:13:01/19",
+ "labels": ["00:60:d3:00:13:01/19", "Host-13-E"],
+ "cp" : {
+ "device": "of:0000000000000013",
+ "port": 7
+ }
+ },
+ {
+ "id": "00:60:d3:00:13:02/19",
+ "labels": ["00:60:d3:00:13:02/19", "Host-13-F"],
+ "cp" : {
+ "device": "of:0000000000000013",
+ "port": 8
+ }
+ }
+ ]
+}