blob: 7f91de82fefb6922c3ccaad12ea3c41e2d01ffb9 [file] [log] [blame]
Paul Greyson7a300822013-04-09 12:57:49 -07001/***************************************************************************************************
2functions for creating and interacting with the topology view of the webui
3
4flow related topology is in flows.js
5***************************************************************************************************/
6
Paul Greysone15c4392013-04-09 15:05:31 -07007(function () {
Paul Greyson7a300822013-04-09 12:57:49 -07008
Paul Greyson30636252013-04-09 15:22:04 -07009updateTopology = function() {
10
11 /* currently rings.js and map.js can be included to define the topology display */
Paul Greysonb9e879e2013-04-09 21:16:16 -070012
Paul Greyson45aceb22013-04-09 22:17:03 -070013 reconcilePendingLinks(model);
14 updateLinkMap(links);
15
Paul Greyson30636252013-04-09 15:22:04 -070016 drawTopology();
17
Paul Greyson30636252013-04-09 15:22:04 -070018 // setup the mouseover behaviors
19 var allSwitches = d3.selectAll('.edge, .core, .aggregation');
20
21 allSwitches.on('mouseover', mouseOverSwitch);
22 allSwitches.on('mouseout', mouseOutSwitch);
23 allSwitches.on('mouseup', mouseUpSwitch);
24 allSwitches.on('mousedown', mouseDownSwitch);
25
26 // only do switch up/down for core switches
27 d3.selectAll('.core').on('dblclick', doubleClickSwitch);
28}
29
Paul Greysone15c4392013-04-09 15:05:31 -070030})();