GUI -- Added theme listeners, so the instance panel can update the instances on a theme change.
Change-Id: If26d5a6ce9fadc02c7184c5ad4d252fc168300a8
diff --git a/web/gui/src/main/webapp/app/view/topo/topoInst.js b/web/gui/src/main/webapp/app/view/topo/topoInst.js
index 7bd74f9..2ff51af 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoInst.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoInst.js
@@ -50,7 +50,8 @@
var onosInstances,
onosOrder,
oiShowMaster,
- oiBox;
+ oiBox,
+ themeListener;
// ==========================
@@ -291,9 +292,15 @@
onosInstances = {};
onosOrder = [];
oiShowMaster = false;
+
+ // we want to update the instances, each time the theme changes
+ themeListener = ts.addListener(updateInstances);
}
function destroyInst() {
+ ts.removeListener(themeListener);
+ themeListener = null;
+
ps.destroyPanel(idIns);
oiBox = null;
}