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 () {