GUI -- Added updateDevice event handling.
 - Display offline devices as grey.
 - Tracing web socket messages (for now, in console; in future, to trace view).
 - Captured sample events for use with test scenarios - both from and to the server.
 - Added description to scenario file.

Change-Id: I7825b32d63496ebea2ab5789519fb0c6af6c5257
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/addDevice_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/addDevice_ex1.json
new file mode 100644
index 0000000..f00cf2c
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/addDevice_ex1.json
@@ -0,0 +1,15 @@
+{
+  "event": "addDevice",
+  "payload": {
+    "id": "of:0000000000000003",
+    "type": "switch",
+    "online": true,
+    "labels": [
+      "of:0000000000000003",
+      "3",
+      "",
+      null
+    ],
+    "props": {}
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/addHost_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/addHost_ex1.json
new file mode 100644
index 0000000..a97d15a
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/addHost_ex1.json
@@ -0,0 +1,17 @@
+{
+  "event": "addHost",
+  "payload": {
+    "id": "6A:40:24:F7:9C:2C/-1",
+    "ingress": "6A:40:24:F7:9C:2C/-1/0-of:0000000000000003/2",
+    "egress": "of:0000000000000003/2-6A:40:24:F7:9C:2C/-1/0",
+    "cp": {
+      "device": "of:0000000000000003",
+      "port": 2
+    },
+    "labels": [
+      "unknown",
+      "6A:40:24:F7:9C:2C"
+    ],
+    "props": {}
+  }
+}
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
new file mode 100644
index 0000000..92c7848
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/addLink_ex1.json
@@ -0,0 +1,12 @@
+{
+  "event": "addLink",
+  "payload": {
+    "id": "of:0000000000000007/4-of:0000000000000006/1",
+    "type": "direct",
+    "linkWidth": 2,
+    "src": "of:0000000000000007",
+    "srcPort": "4",
+    "dst": "of:0000000000000006",
+    "dstPort": "1"
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/removeDevice_fab.json b/web/gui/src/main/webapp/json/ev/_capture/rx/removeDevice_fab.json
new file mode 100644
index 0000000..0e8d47a
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/removeDevice_fab.json
@@ -0,0 +1,20 @@
+{
+  "__comments__": [
+    "fabricated event",
+    "not sure if this is the actual format",
+    "but we really only care about 'id' being in the payload"
+  ],
+  "event": "removeDevice",
+  "payload": {
+    "id": "of:0000000000000002",
+    "type": "switch",
+    "online": true,
+    "labels": [
+      "of:0000000000000002",
+      "2",
+      "",
+      null
+    ],
+    "props": {}
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/removeHost_fab.json b/web/gui/src/main/webapp/json/ev/_capture/rx/removeHost_fab.json
new file mode 100644
index 0000000..4237199
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/removeHost_fab.json
@@ -0,0 +1,22 @@
+{
+  "__comments__": [
+    "fabricated event",
+    "not sure if this is the actual format",
+    "but we really only care about 'id' being in the payload"
+  ],
+  "event": "removeHost",
+  "payload": {
+    "id": "6A:40:24:F7:9C:2C/-1",
+    "ingress": "6A:40:24:F7:9C:2C/-1/0-of:0000000000000003/2",
+    "egress": "of:0000000000000003/2-6A:40:24:F7:9C:2C/-1/0",
+    "cp": {
+      "device": "of:0000000000000003",
+      "port": 2
+    },
+    "labels": [
+      "unknown",
+      "6A:40:24:F7:9C:2C"
+    ],
+    "props": {}
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/removeLink_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/removeLink_ex1.json
new file mode 100644
index 0000000..8d1dd03
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/removeLink_ex1.json
@@ -0,0 +1,12 @@
+{
+  "event": "removeLink",
+  "payload": {
+    "id": "of:0000000000000001/1-of:0000000000000002/4",
+    "type": "direct",
+    "linkWidth": 2,
+    "src": "of:0000000000000001",
+    "srcPort": "1",
+    "dst": "of:0000000000000002",
+    "dstPort": "4"
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/showPath_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/showPath_ex1.json
new file mode 100644
index 0000000..de1023e
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/showPath_ex1.json
@@ -0,0 +1,15 @@
+{
+  "event": "showPath",
+  "sid": 15,
+  "payload": {
+    "links": [
+      "62:4F:65:BF:FF:B3/-1/0-of:000000000000000b/1",
+      "of:000000000000000b/4-of:000000000000000a/1",
+      "of:000000000000000a/4-of:0000000000000001/3",
+      "of:0000000000000001/1-of:0000000000000002/4",
+      "of:0000000000000002/1-of:0000000000000003/4",
+      "of:0000000000000003/1-CA:4B:EE:A4:B0:33/-1/0"
+    ],
+    "intentId": "0x52a914f9"
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex1.json
new file mode 100644
index 0000000..dda6186
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex1.json
@@ -0,0 +1,15 @@
+{
+  "event": "updateDevice",
+  "payload": {
+    "id": "of:0000000000000002",
+    "type": "switch",
+    "online": true,
+    "labels": [
+      "of:0000000000000002",
+      "2",
+      "",
+      null
+    ],
+    "props": {}
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex2.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex2.json
new file mode 100644
index 0000000..d607f98
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateDevice_ex2.json
@@ -0,0 +1,15 @@
+{
+  "event": "updateDevice",
+  "payload": {
+    "id": "of:0000000000000002",
+    "type": "switch",
+    "online": false,
+    "labels": [
+      "of:0000000000000002",
+      "2",
+      "",
+      null
+    ],
+    "props": {}
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateHost.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateHost.json
new file mode 100644
index 0000000..fd7361c
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateHost.json
@@ -0,0 +1,17 @@
+{
+  "event": "updateHost",
+  "payload": {
+    "id": "AA:C2:74:3F:B8:06/-1",
+    "ingress": "AA:C2:74:3F:B8:06/-1/0-of:0000000000000005/3",
+    "egress": "of:0000000000000005/3-AA:C2:74:3F:B8:06/-1/0",
+    "cp": {
+      "device": "of:0000000000000005",
+      "port": 3
+    },
+    "labels": [
+      "10.0.0.9",
+      "AA:C2:74:3F:B8:06"
+    ],
+    "props":{}
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/rx/updateLink_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/rx/updateLink_ex1.json
new file mode 100644
index 0000000..3be5c5f
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/rx/updateLink_ex1.json
@@ -0,0 +1,12 @@
+{
+  "event": "updateLink",
+  "payload": {
+    "id": "of:0000000000000002/4-of:0000000000000001/1",
+    "type": "direct",
+    "linkWidth": 2,
+    "src": "of:0000000000000002",
+    "srcPort": "4",
+    "dst": "of:0000000000000001",
+    "dstPort": "1"
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/requestPath_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/tx/requestPath_ex1.json
new file mode 100644
index 0000000..4963865
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/tx/requestPath_ex1.json
@@ -0,0 +1,8 @@
+{
+  "event": "requestPath",
+  "sid": 15,
+  "payload": {
+    "one": "62:4F:65:BF:FF:B3/-1",
+    "two": "CA:4B:EE:A4:B0:33/-1"
+  }
+}
diff --git a/web/gui/src/main/webapp/json/ev/_capture/tx/updateMeta_ex1.json b/web/gui/src/main/webapp/json/ev/_capture/tx/updateMeta_ex1.json
new file mode 100644
index 0000000..c04727e
--- /dev/null
+++ b/web/gui/src/main/webapp/json/ev/_capture/tx/updateMeta_ex1.json
@@ -0,0 +1,10 @@
+{
+  "event": "updateMeta",
+  "sid": 11,
+  "payload": {
+    "id": "62:4F:65:BF:FF:B3/-1",
+    "class": "host",
+    "x": 197,
+    "y": 177
+  }
+}