ONOS-5726: augmented implementation of "showIntent" overlay support.
- added acceptIntent() callback hook, to allow overlays to declare which intent types they can display.
Change-Id: I18d0b6f05b0a348623bd5a90d58d996d389bdd95
diff --git a/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js b/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js
index 312b652..ac8f4a2 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoTrafficNew.js
@@ -143,8 +143,12 @@
tts.requestTrafficForMode(true);
},
- // intent visualization hook
- showintent: function (info) {
+ // intent visualization hooks
+ acceptIntent: function (type) {
+ // accept any intent type except "Protected" intents
+ return (!type.startsWith('Protected'));
+ },
+ showIntent: function (info) {
$log.debug('^^ trafficOverlay.showintent() ^^', info);
tts.selectIntent(info);
}