blob: 9801302a121b059a4fca439ca26d7c63b8f47bef [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 Greyson30636252013-04-09 15:22:04 -070013 drawTopology();
14
Paul Greyson30636252013-04-09 15:22:04 -070015 // setup the mouseover behaviors
16 var allSwitches = d3.selectAll('.edge, .core, .aggregation');
17
18 allSwitches.on('mouseover', mouseOverSwitch);
19 allSwitches.on('mouseout', mouseOutSwitch);
20 allSwitches.on('mouseup', mouseUpSwitch);
21 allSwitches.on('mousedown', mouseDownSwitch);
22
23 // only do switch up/down for core switches
24 d3.selectAll('.core').on('dblclick', doubleClickSwitch);
25}
26
Paul Greysone15c4392013-04-09 15:05:31 -070027})();