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
Showing
2 changed files
with
7 additions
and
3 deletions
... | @@ -741,6 +741,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { | ... | @@ -741,6 +741,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { |
741 | public void event(DeviceEvent event) { | 741 | public void event(DeviceEvent event) { |
742 | if (event.type() != PORT_STATS_UPDATED) { | 742 | if (event.type() != PORT_STATS_UPDATED) { |
743 | msgSender.execute(() -> sendMessage(deviceMessage(event))); | 743 | msgSender.execute(() -> sendMessage(deviceMessage(event))); |
744 | + msgSender.execute(traffic::pokeIntent); | ||
744 | eventAccummulator.add(event); | 745 | eventAccummulator.add(event); |
745 | } | 746 | } |
746 | } | 747 | } |
... | @@ -751,6 +752,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { | ... | @@ -751,6 +752,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { |
751 | @Override | 752 | @Override |
752 | public void event(LinkEvent event) { | 753 | public void event(LinkEvent event) { |
753 | msgSender.execute(() -> sendMessage(linkMessage(event))); | 754 | msgSender.execute(() -> sendMessage(linkMessage(event))); |
755 | + msgSender.execute(traffic::pokeIntent); | ||
754 | eventAccummulator.add(event); | 756 | eventAccummulator.add(event); |
755 | } | 757 | } |
756 | } | 758 | } |
... | @@ -760,6 +762,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { | ... | @@ -760,6 +762,7 @@ public class TopologyViewMessageHandler extends TopologyViewMessageHandlerBase { |
760 | @Override | 762 | @Override |
761 | public void event(HostEvent event) { | 763 | public void event(HostEvent event) { |
762 | msgSender.execute(() -> sendMessage(hostMessage(event))); | 764 | msgSender.execute(() -> sendMessage(hostMessage(event))); |
765 | + msgSender.execute(traffic::pokeIntent); | ||
763 | eventAccummulator.add(event); | 766 | eventAccummulator.add(event); |
764 | } | 767 | } |
765 | } | 768 | } | ... | ... |
... | @@ -333,7 +333,7 @@ | ... | @@ -333,7 +333,7 @@ |
333 | var hdata = api.findNodeById(host.id), | 333 | var hdata = api.findNodeById(host.id), |
334 | badgeData = host.badge || null; | 334 | badgeData = host.badge || null; |
335 | 335 | ||
336 | - if (hdata && !hdata.el.empty()) { | 336 | + if (hdata && hdata.el && !hdata.el.empty()) { |
337 | hdata.badge = badgeData; | 337 | hdata.badge = badgeData; |
338 | if (!host.subdue) { | 338 | if (!host.subdue) { |
339 | api.unsupNode(hdata.id, less); | 339 | api.unsupNode(hdata.id, less); |
... | @@ -346,7 +346,7 @@ | ... | @@ -346,7 +346,7 @@ |
346 | var ddata = api.findNodeById(device.id), | 346 | var ddata = api.findNodeById(device.id), |
347 | badgeData = device.badge || null; | 347 | badgeData = device.badge || null; |
348 | 348 | ||
349 | - if (ddata && !ddata.el.empty()) { | 349 | + if (ddata && ddata.el && !ddata.el.empty()) { |
350 | ddata.badge = badgeData; | 350 | ddata.badge = badgeData; |
351 | if (!device.subdue) { | 351 | if (!device.subdue) { |
352 | api.unsupNode(ddata.id, less); | 352 | api.unsupNode(ddata.id, less); |
... | @@ -359,7 +359,8 @@ | ... | @@ -359,7 +359,8 @@ |
359 | var ldata = api.findLinkById(link.id), | 359 | var ldata = api.findLinkById(link.id), |
360 | lab = link.label, | 360 | lab = link.label, |
361 | units, portcls, magnitude; | 361 | units, portcls, magnitude; |
362 | - if (ldata && !ldata.el.empty()) { | 362 | + |
363 | + if (ldata && ldata.el && !ldata.el.empty()) { | ||
363 | if (!link.subdue) { | 364 | if (!link.subdue) { |
364 | api.unsupLink(ldata.key, less); | 365 | api.unsupLink(ldata.key, less); |
365 | } | 366 | } | ... | ... |
-
Please register or login to post a comment