commit | 8ba9e6dbf7a57c4e63f003fc27d693c2506b367b | [log] [tgz] |
---|---|---|
author | Steven Burrows <sburrows@villa-technologies.com> | Wed Nov 01 16:01:23 2017 +0000 |
committer | Thomas Vachuska <tom@opennetworking.org> | Wed Nov 01 18:02:36 2017 +0000 |
tree | 7f024c1d8863a8d19d0d1d3707604d005b4b8e9a | |
parent | 085621be2cb7bd741f1f99d60308b4bf2520131e [diff] |
ONOS-7183: Toggle Offline devices Fixed the rendering on NodeEnter that displayed the devices regardless of the Show Offline value Change-Id: I9f04518813cac2db17c7e62290c91605eb3b7f85
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Device.js b/web/gui/src/main/webapp/app/view/topo2/topo2Device.js index ebed084..6710a87 100644 --- a/web/gui/src/main/webapp/app/view/topo2/topo2Device.js +++ b/web/gui/src/main/webapp/app/view/topo2/topo2Device.js
@@ -93,6 +93,7 @@ setOfflineVisibility: function () { var showOffline = ps.getPrefs('topo2_prefs')['offline_devices'], display = this.get('online') || showOffline; + this.el.style('visibility', display ? 'visible' : 'hidden'); }, onExit: function () {
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js b/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js index c66f60e..fd9c55b 100644 --- a/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js +++ b/web/gui/src/main/webapp/app/view/topo2/topo2NodeModel.js
@@ -214,6 +214,10 @@ onEnter: function (el) { this.el = d3.select(el); this.render(); + + if (this.setOfflineVisibility) { + this.setOfflineVisibility(); + } }, setScale: function () {