Adding enhancements to the GUI server-side.
Fixing a few intent-related glitches for the optical use-case.
Fixing lat/lng information in the optical config.
Change-Id: I6a1dd1ee69c2db2f0e351d191627bba468a3c49c
diff --git a/web/gui/src/main/webapp/topo2.js b/web/gui/src/main/webapp/topo2.js
index 8934ec3..f93595f 100644
--- a/web/gui/src/main/webapp/topo2.js
+++ b/web/gui/src/main/webapp/topo2.js
@@ -130,8 +130,8 @@
U: unpin,
W: requestTraffic, // bag of selections
- Z: requestPath, // host-to-host intent (and monitor)
- X: cancelMonitor
+ X: cancelTraffic,
+ Z: requestPath // host-to-host intent (and monitor)
};
// state variables
@@ -496,7 +496,23 @@
}
function showTraffic(data) {
- network.view.alert("showTraffic() -- TODO")
+ fnTrace('showTraffic', data.payload.id);
+ data.payload.paths.forEach(function () {
+ var links = data.payload.links,
+ s = [ data.event + "\n" + links.length ];
+ links.forEach(function (d, i) {
+ s.push(d);
+ });
+ network.view.alert(s.join('\n'));
+
+ links.forEach(function (d, i) {
+ var link = network.lookup[d];
+ if (link) {
+ link.el.classed('showPath', true);
+ }
+ });
+ });
+ //network.view.alert("showTraffic() -- TODO")
}
// ...............................
@@ -566,9 +582,9 @@
}
}
- function cancelMonitor() {
+ function cancelTraffic() {
// FIXME: from where do we get the intent id(s) to send to the server?
- sendMessage('cancelMonitor', {
+ sendMessage('cancelTraffic', {
ids: ["need_the_intent_id"]
});
}