Adding server-side code for sending device/host details to the client.

Change-Id: I02e15db996a848fc064ccaa14f0274275020d6be
diff --git a/web/gui/src/main/java/org/onlab/onos/gui/TopologyMessages.java b/web/gui/src/main/java/org/onlab/onos/gui/TopologyMessages.java
index d68e8fa..1aabf3b 100644
--- a/web/gui/src/main/java/org/onlab/onos/gui/TopologyMessages.java
+++ b/web/gui/src/main/java/org/onlab/onos/gui/TopologyMessages.java
@@ -350,7 +350,6 @@
                              new Prop("Longitude", annot.value("longitude"))));
     }
 
-
     // Produces a path message to the client.
     protected ObjectNode pathMessage(Path path, String type) {
         ObjectNode payload = mapper.createObjectNode();
diff --git a/web/gui/src/main/java/org/onlab/onos/gui/TopologyWebSocket.java b/web/gui/src/main/java/org/onlab/onos/gui/TopologyWebSocket.java
index 212f14d..2506b13 100644
--- a/web/gui/src/main/java/org/onlab/onos/gui/TopologyWebSocket.java
+++ b/web/gui/src/main/java/org/onlab/onos/gui/TopologyWebSocket.java
@@ -110,8 +110,8 @@
         try {
             ObjectNode event = (ObjectNode) mapper.reader().readTree(data);
             String type = string(event, "event", "unknown");
-            if (type.equals("showDetails")) {
-                showDetails(event);
+            if (type.equals("requestDetails")) {
+                requestDetails(event);
             } else if (type.equals("updateMeta")) {
                 updateMetaUi(event);
             } else if (type.equals("requestPath")) {
@@ -165,9 +165,9 @@
     }
 
     // Sends back device or host details.
-    private void showDetails(ObjectNode event) {
+    private void requestDetails(ObjectNode event) {
         ObjectNode payload = payload(event);
-        String type = string(payload, "type", "unknown");
+        String type = string(payload, "class", "unknown");
         if (type.equals("device")) {
             sendMessage(deviceDetails(deviceId(string(payload, "id")),
                                       number(event, "sid")));