Paul Greyson | c090d14 | 2013-04-09 16:59:03 -0700 | [diff] [blame] | 1 | function appInit(cb) { |
Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 2 | |
| 3 | // populates selected flows with empty rows |
| 4 | updateSelectedFlows(); |
| 5 | |
| 6 | d3.select('#showFlowChooser').on('click', function () { |
| 7 | showFlowChooser(); |
| 8 | }); |
Paul Greyson | c090d14 | 2013-04-09 16:59:03 -0700 | [diff] [blame] | 9 | |
Paul Greyson | e6266b9 | 2013-04-09 23:15:27 -0700 | [diff] [blame] | 10 | 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 Greyson | c090d14 | 2013-04-09 16:59:03 -0700 | [diff] [blame] | 28 | createTopologyView(cb); |
Paul Greyson | 7a30082 | 2013-04-09 12:57:49 -0700 | [diff] [blame] | 29 | } |