ONOS-4646: Provide temp. mechanism for topology overlays to modify link details data.
Change-Id: I00b78b1da1580883e09af87ed470e6142a1ec19b
(cherry picked from commit 4f732d2)
diff --git a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
index 0add26c..b04bd53 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoOverlay.js
@@ -277,6 +277,13 @@
cb && cb();
}
+ // Temporary function to allow overlays to modify link detail data
+ // in the client. (In the near future, this will be done on the server).
+ function modifyLinkDataHook(data, extra) {
+ var cb = _hook('modifylinkdata');
+ return cb && extra ? cb(data, extra) : data;
+ }
+
// === -----------------------------------------------------
// Event (from server) Handlers
@@ -427,7 +434,8 @@
singleSelect: singleSelectHook,
multiSelect: multiSelectHook,
mouseOver: mouseOverHook,
- mouseOut: mouseOutHook
+ mouseOut: mouseOutHook,
+ modifyLinkData: modifyLinkDataHook
},
showHighlights: showHighlights