ONOS-5726: Route "show-intent" request through a topo-overlay hook.
(This is the first of several steps for this Jira ticket).
Change-Id: Iad8d0500d68f36de17c681b1072bfaa1e94f0b33
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index 14ca96f..90e9411 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -506,15 +506,24 @@
flash.enable(true);
}
+ // initial set of topo events received, now do post-processing
function topoStartDone() {
- var d = $scope.intentData;
- // give a small delay before attempting to reselect node(s) and stuff
- // since they have to be re-added to the DOM first...
+ // give a small delay before attempting to reselect node(s) and
+ // highlight elements, since they have to be re-added to the DOM first...
$timeout(function () {
+ $log.debug('^^ topo.topoStartDone() ^^');
+
+ // reselect the previous selection...
tss.reselect();
- if (d) {
- tts.selectIntent(d);
+
+ // if an intent should be shown, invoke the appropriate callback
+ if ($scope.intentData) {
+
+ // TODO: if a specific overlay was requested, activate that first
+
+ tov.hooks.showIntent($scope.intentData);
}
+
}, 200);
}