Topo2 - Host label should always be visible
Fixed Tasks; ONOS-6275, ONOS-6277
Change-Id: I60342c2e4c3af2dc8be684b50426cbeda71f6d7b
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Host.js b/web/gui/src/main/webapp/app/view/topo2/topo2Host.js
index 7a6a507..7ba58ba 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Host.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Host.js
@@ -59,7 +59,6 @@
events: {
'click': 'onClick'
},
-
initialize: function () {
this.super = this.constructor.__super__;
this.super.initialize.apply(this, arguments);
@@ -78,18 +77,7 @@
return remappedDeviceTypes[type] || type || 'm_endstation';
},
label: function () {
- var labelText = this.get('id'),
- ips = this.get('ips');
-
- if (this.labelIndex() === 0) {
- return '';
- }
-
- if (ips && ips.length > 0) {
- labelText = ips[0];
- }
-
- return labelText;
+ return this.get('ips')[0] || 'unknown';
},
setScale: function () {