GUI Topo -- Cleaned up NodeBadge, now that we have a clearer idea of what we want to model.
Change-Id: I754a94cbd1fbe2a2c8affccaca88c48c3fa33b92
diff --git a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
index 74fa2f2..9a3b435 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
@@ -294,7 +294,8 @@
unsupLink( key, [less] )
*/
- // TODO: clear node highlighting
+ api.clearNodeDeco();
+ api.removeNodeBadges();
api.clearLinkTrafficStyle();
api.removeLinkLabels();
@@ -319,8 +320,11 @@
});
data.devices.forEach(function (device) {
- var ddata = api.findNodeById(device.id);
+ var ddata = api.findNodeById(device.id),
+ badgeData = device.badge || null;
+
if (ddata && !ddata.el.empty()) {
+ ddata.badge = badgeData;
if (!device.subdue) {
api.unsupNode(ddata.id, less);
}