ONOS-1479 -- GUI - augmenting topology view for extensibility:
- Preliminary work in implementing installation of custom buttons to details panel for selected device.

Change-Id: Id26ac301f72b4521d2a388d34ee0a287f400c68c
diff --git a/web/gui/src/main/webapp/app/view/topo/topoSelect.js b/web/gui/src/main/webapp/app/view/topo/topoSelect.js
index 051ce05..c02ef51 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoSelect.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoSelect.js
@@ -23,7 +23,7 @@
     'use strict';
 
     // injected refs
-    var $log, fs, wss, tps, tts, ns;
+    var $log, fs, wss, tov, tps, tts, ns;
 
     // api to topoForce
     var api;
@@ -229,9 +229,13 @@
     //  Event Handlers
 
     function showDetails(data) {
+        var buttons = fs.isA(data.buttons);
+
         // display the data for the single selected node
         tps.displaySingle(data);
 
+        // TODO: use server-side-button-descriptors to add buttons
+
         // always add the 'show traffic' action
         tps.addAction({
             id: '-sin-rel-traf-btn',
@@ -249,6 +253,13 @@
                 tt: 'Show Device Flows'
             });
         }
+
+        // TODO: for now, install overlay buttons here
+        if (buttons) {
+            tov.installButtons(buttons, tps.addAction, data);
+        }
+
+
         // TODO: have the server return explicit class and ID of each node
         // for now, we assume the node is a device if it has a URI
         if ((data.props).hasOwnProperty('URI')) {
@@ -308,13 +319,14 @@
 
     angular.module('ovTopo')
     .factory('TopoSelectService',
-        ['$log', 'FnService', 'WebSocketService',
+        ['$log', 'FnService', 'WebSocketService', 'TopoOverlayService',
             'TopoPanelService', 'TopoTrafficService', 'NavService',
 
-        function (_$log_, _fs_, _wss_, _tps_, _tts_, _ns_) {
+        function (_$log_, _fs_, _wss_, _tov_, _tps_, _tts_, _ns_) {
             $log = _$log_;
             fs = _fs_;
             wss = _wss_;
+            tov = _tov_;
             tps = _tps_;
             tts = _tts_;
             ns = _ns_;