Close the topo2 instance panel on navigation
topo and topo2 instance panel css seperated
Change-Id: I4460471d424100f942cc6f19c964437b649d01b2
diff --git a/web/gui/src/main/webapp/app/view/topo2/topo2Instance.js b/web/gui/src/main/webapp/app/view/topo2/topo2Instance.js
index b35f10c..1172662 100644
--- a/web/gui/src/main/webapp/app/view/topo2/topo2Instance.js
+++ b/web/gui/src/main/webapp/app/view/topo2/topo2Instance.js
@@ -9,7 +9,7 @@
// configuration
var showLogicErrors = true,
- idIns = 'topo-p-instance',
+ idIns = 'topo2-p-instance',
instOpts = {
edge: 'left',
width: 20
@@ -238,6 +238,16 @@
});
}
+ function destroy() {
+ ts.removeListener(updateInstances);
+
+ ps.destroyPanel(idIns);
+ oiBox = null;
+
+ onosInstances = {};
+ onosOrder = [];
+ }
+
angular.module('ovTopo2')
.factory('Topo2InstanceService',
['$log', 'PanelService', 'SvgUtilService', 'GlyphService',
@@ -252,7 +262,8 @@
return {
initInst: initInst,
- allInstances: allInstances
+ allInstances: allInstances,
+ destroy: destroy
};
}]);