root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / ember / routes / vm.js @ 74c8da56
History | View | Annotate | Download (1.3 kB)
1 |
App.VmRoute = Ember.Route.extend({ |
---|---|
2 |
|
3 |
redirect: function() { |
4 |
this.transitionTo('vm.info'); |
5 |
}, |
6 |
|
7 |
renderTemplate: function() { |
8 |
|
9 |
this.render('details'); |
10 |
|
11 |
this.render('lt-bar', { |
12 |
into: 'details', |
13 |
outlet: 'lt-bar', |
14 |
controller: 'vms', |
15 |
}); |
16 |
this.render('tabs-details', { |
17 |
into: 'details', |
18 |
outlet: 'tabs-details', |
19 |
controller: 'vms', |
20 |
}); |
21 |
}, |
22 |
}); |
23 |
|
24 |
|
25 |
App.VminitRoute = Ember.Route.extend({ |
26 |
|
27 |
model: function(){ |
28 |
return this.store.find('vm'); |
29 |
}, |
30 |
|
31 |
afterModel: function(model) { |
32 |
this.transitionTo('vm', model.get('firstObject').id); |
33 |
}, |
34 |
|
35 |
}); |
36 |
|
37 |
App.VmInfoRoute = Ember.Route.extend({ |
38 |
renderTemplate: function() { |
39 |
this.render('details/info'); |
40 |
}, |
41 |
model: function () { |
42 |
return this.modelFor("vm"); |
43 |
}, |
44 |
}); |
45 |
|
46 |
App.VmDiskConnectedRoute = Ember.Route.extend({ |
47 |
renderTemplate: function() { |
48 |
this.render('details/disk-connected'); |
49 |
}, |
50 |
model: function () { |
51 |
return this.modelFor("vm"); |
52 |
} |
53 |
}); |
54 |
|
55 |
App.VmNetworkConnectedRoute = Ember.Route.extend({ |
56 |
renderTemplate: function() { |
57 |
this.render('details/network-connected'); |
58 |
}, |
59 |
model: function () { |
60 |
return this.modelFor("vm"); |
61 |
} |
62 |
}); |