ONOS-7181: Hide port label on UiEdgeLinks when hosts are disabled

Change-Id: I87b9ab5577d153bbb59946974f51372527452835
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Link.js b/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
index 3af8c0c..d905757 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Link.js
@@ -163,6 +163,11 @@
                 var data = [],
                     point;
 
+                var hostsVisible = ps.getPrefs('topo2_prefs')['hosts'];
+                if (!hostsVisible && this.get('type') === 'UiEdgeLink') {
+                    return;
+                }
+
                 if (showPort()) {
                     this.set('enhanced', true);
                     point = this.locatePortLabel();