blob: dd11bf825818acbe8a5509d1833a67820df1cc07 [file] [log] [blame]
Paul Greysonc090d142013-04-09 16:59:03 -07001function appInit(cb) {
Paul Greyson7a300822013-04-09 12:57:49 -07002
3 // populates selected flows with empty rows
4 updateSelectedFlows();
5
6 d3.select('#showFlowChooser').on('click', function () {
7 showFlowChooser();
8 });
Paul Greysonc090d142013-04-09 16:59:03 -07009
Paul Greysone6266b92013-04-09 23:15:27 -070010 d3.select('#action-all').on('click', function () {
11 var prompt = "Switch controllers to all?"
12 if (confirm(prompt)) {
13 switchAll();
14 }
15 });
16
17 d3.select('#action-local').on('click', function () {
18 var prompt = "Switch controllers to local?"
19 if (confirm(prompt)) {
20 switchLocal();
21 }
22 });
23
24 d3.select('#action-scale').on('click', function () {
25 alert('scale')
26 });
27
Paul Greysonc090d142013-04-09 16:59:03 -070028 createTopologyView(cb);
Paul Greyson7a300822013-04-09 12:57:49 -070029}