ONOS-1479 -- GUI - augmenting topology view for extensibility: WIP.

Change-Id: I11820a9ff8f446c0d10a0311cee5ce448c15f402
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
index 8dbb111..9265e5f 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
@@ -72,7 +72,7 @@
 import org.onosproject.ui.JsonUtils;
 import org.onosproject.ui.UiConnection;
 import org.onosproject.ui.UiMessageHandler;
-import org.onosproject.ui.topo.ButtonDescriptor;
+import org.onosproject.ui.topo.ButtonId;
 import org.onosproject.ui.topo.PropertyPanel;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -123,6 +123,8 @@
             new ProviderId("core", "org.onosproject.core", true);
     private static final String COMPACT = "%s/%s-%s/%s";
 
+    private static final String SHOW_HIGHLIGHTS = "showHighlights";
+
     private static final double KILO = 1024;
     private static final double MEGA = 1024 * KILO;
     private static final double GIGA = 1024 * MEGA;
@@ -642,7 +644,7 @@
                 labelsN.add("");
             }
         }
-        return JsonUtils.envelope("showTraffic", 0, payload);
+        return JsonUtils.envelope(SHOW_HIGHLIGHTS, 0, payload);
     }
 
     private Load getLinkLoad(Link link) {
@@ -679,7 +681,7 @@
                 addLinkFlows(link, paths, counts.get(link));
             }
         }
-        return JsonUtils.envelope("showTraffic", 0, payload);
+        return JsonUtils.envelope(SHOW_HIGHLIGHTS, 0, payload);
     }
 
     private void addLinkFlows(Link link, ArrayNode paths, Integer count) {
@@ -723,7 +725,7 @@
             ((ArrayNode) pathNode.path("labels")).add(hasTraffic ? formatBytes(biLink.bytes) : "");
         }
 
-        return JsonUtils.envelope("showTraffic", 0, payload);
+        return JsonUtils.envelope(SHOW_HIGHLIGHTS, 0, payload);
     }
 
     // Classifies the link traffic according to the specified classes.
@@ -870,21 +872,13 @@
         result.set("props", pnode);
 
         ArrayNode buttons = arrayNode();
-        for (ButtonDescriptor b : pp.buttons()) {
-            buttons.add(json(b));
+        for (ButtonId b : pp.buttons()) {
+            buttons.add(b.id());
         }
         result.set("buttons", buttons);
         return result;
     }
 
-    // translates the button descriptor into JSON
-    private ObjectNode json(ButtonDescriptor bdesc) {
-        return objectNode()
-                .put("id", bdesc.id())
-                .put("gid", bdesc.glyphId())
-                .put("tt", bdesc.tooltip());
-    }
-
 
     // Produces canonical link key, i.e. one that will match link and its inverse.
     static LinkKey canonicalLinkKey(Link link) {