Topo2: Reset node position and unpin
Refactored NodeModel
Added class to the surrounding rect for selected class
Renamed Panels to avoid conflict with classic topo
Topo2: Details Panel for single device selection
Topo2: Added Equalize Masters keyboard shortcut
Topo2: Toggle Link Port highlighting
Topo2: Node Labels was returning empty string
       if friendly name was null
Topo2: Reset map zoom and panning

Change-Id: I0a949b2f8205e1abcfcac5aaec65c18d76e77cff
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2View.js b/web/gui/src/main/webapp/app/view/topo2/topo2View.js
index 9178e1a..ae29894 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2View.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2View.js
@@ -15,14 +15,21 @@
  */
 
 /*
- ONOS GUI -- Topology Layout Module.
- Module that contains the d3.force.layout logic
+ ONOS GUI -- Topology View Module.
+ Module that contains the topology view variables
  */
 
 (function () {
     'use strict';
 
-    var dimensions;
+    // Injected Services
+    var flash;
+
+    // Internal State
+    var dimensions,
+        viewOptions = {
+            linkPortHighlighting: true
+        };
 
     function newDim(_dimensions) {
         dimensions = _dimensions;
@@ -32,13 +39,33 @@
         return dimensions;
     }
 
+    function togglePortHighlights(x) {
+        var kev = (x === 'keyev'),
+            on = kev ? !viewOptions.linkPortHighlighting : Boolean(x),
+            what = on ? 'Enable' : 'Disable';
+
+        viewOptions.linkPortHighlighting = on;
+        flash.flash(what + ' port highlighting');
+        return on;
+    }
+
+    function getPortHighlighting() {
+        return viewOptions.linkPortHighlighting;
+    }
+
     angular.module('ovTopo2')
     .factory('Topo2ViewService',
-        [
-            function () {
+        ['FlashService',
+            function (_flash_) {
+
+                flash = _flash_;
+
                 return {
                     newDim: newDim,
-                    getDimensions: getDimensions
+                    getDimensions: getDimensions,
+
+                    togglePortHighlights: togglePortHighlights,
+                    getPortHighlighting: getPortHighlighting
                 };
             }
         ]