blob: a41244040475239389dc9efc80d352858eda4df7 [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 Greyson69f8baa2013-04-10 12:16:53 -070028 d3.select('#action-reset').on('click', function () {
29 alert('reset')
30 });
31
Paul Greysonc090d142013-04-09 16:59:03 -070032 createTopologyView(cb);
Paul Greyson7a300822013-04-09 12:57:49 -070033}