Simon Hunt
Committed by Gerrit Code Review

GUI- poke the traffic monitor to resend highlight data, on topology event.

 - also, fix potential NPE (.el element may be null)

Change-Id: Ibdb5085404e81bfa770ee80d1457bc630635a169
......@@ -741,6 +741,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
public void event(DeviceEvent event) {
if (event.type() != PORT_STATS_UPDATED) {
msgSender.execute(() -> sendMessage(deviceMessage(event)));
msgSender.execute(traffic::pokeIntent);
eventAccummulator.add(event);
}
}
......@@ -751,6 +752,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
@Override
public void event(LinkEvent event) {
msgSender.execute(() -> sendMessage(linkMessage(event)));
msgSender.execute(traffic::pokeIntent);
eventAccummulator.add(event);
}
}
......@@ -760,6 +762,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase {
@Override
public void event(HostEvent event) {
msgSender.execute(() -> sendMessage(hostMessage(event)));
msgSender.execute(traffic::pokeIntent);
eventAccummulator.add(event);
}
}
......
......@@ -333,7 +333,7 @@
var hdata = api.findNodeById(host.id),
badgeData = host.badge || null;
if (hdata && !hdata.el.empty()) {
if (hdata && hdata.el && !hdata.el.empty()) {
hdata.badge = badgeData;
if (!host.subdue) {
api.unsupNode(hdata.id, less);
......@@ -346,7 +346,7 @@
var ddata = api.findNodeById(device.id),
badgeData = device.badge || null;
if (ddata && !ddata.el.empty()) {
if (ddata && ddata.el && !ddata.el.empty()) {
ddata.badge = badgeData;
if (!device.subdue) {
api.unsupNode(ddata.id, less);
......@@ -359,7 +359,8 @@
var ldata = api.findLinkById(link.id),
lab = link.label,
units, portcls, magnitude;
if (ldata && !ldata.el.empty()) {
if (ldata && ldata.el && !ldata.el.empty()) {
if (!link.subdue) {
api.unsupLink(ldata.key, less);
}
......