blob: f7bd55b7a7931911d8d5e7c9cdf98fe61e02c7a9 [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?"
Paul Greyson28cf92b2013-04-10 13:15:06 -070012 doConfirm(prompt, function (result) {
13 if (result) {
14 switchAll();
15 }
16 });
Paul Greysone6266b92013-04-09 23:15:27 -070017 });
18
19 d3.select('#action-local').on('click', function () {
20 var prompt = "Switch controllers to local?"
Paul Greyson28cf92b2013-04-10 13:15:06 -070021 doConfirm(prompt, function (result) {
22 if (result) {
23 switchLocal();
24 }
25 });
Paul Greysone6266b92013-04-09 23:15:27 -070026 });
27
28 d3.select('#action-scale').on('click', function () {
29 alert('scale')
30 });
31
Paul Greyson69f8baa2013-04-10 12:16:53 -070032 d3.select('#action-reset').on('click', function () {
33 alert('reset')
34 });
35
Paul Greysonc090d142013-04-09 16:59:03 -070036 createTopologyView(cb);
Paul Greyson7a300822013-04-09 12:57:49 -070037}