mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 12:16:13 +02:00
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
This commit is contained in:
parent
41675d22f3
commit
8419efd32c
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -284,6 +284,13 @@
|
||||
return cb && extra ? cb(data, extra) : data;
|
||||
}
|
||||
|
||||
// Request from Intent View to visualize an intent on the topo view
|
||||
function showIntentHook(intentData) {
|
||||
$log.debug('^^ topoOverlay.showIntentHook(...) ^^');
|
||||
var cb = _hook('showintent');
|
||||
return cb && cb(intentData);
|
||||
}
|
||||
|
||||
// === -----------------------------------------------------
|
||||
// Event (from server) Handlers
|
||||
|
||||
@ -435,7 +442,8 @@
|
||||
multiSelect: multiSelectHook,
|
||||
mouseOver: mouseOverHook,
|
||||
mouseOut: mouseOutHook,
|
||||
modifyLinkData: modifyLinkDataHook
|
||||
modifyLinkData: modifyLinkDataHook,
|
||||
showIntent: showIntentHook
|
||||
},
|
||||
|
||||
showHighlights: showHighlights
|
||||
|
||||
@ -141,6 +141,12 @@
|
||||
},
|
||||
mouseout: function () {
|
||||
tts.requestTrafficForMode(true);
|
||||
},
|
||||
|
||||
// intent visualization hook
|
||||
showintent: function (intentData) {
|
||||
$log.debug('^^ trafficOverlay.showintent() ^^');
|
||||
tts.selectIntent(intentData);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user