root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / ember / routes / volume.js @ 631f7329
History | View | Annotate | Download (976 Bytes)
1 |
App.VolumeRoute = Ember.Route.extend({ |
---|---|
2 |
|
3 |
redirect: function() { |
4 |
this.transitionTo('volume.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: 'volumes', |
15 |
}); |
16 |
}, |
17 |
|
18 |
}); |
19 |
|
20 |
|
21 |
App.VolumeinitRoute = Ember.Route.extend({ |
22 |
|
23 |
model: function(){ |
24 |
return this.store.find('volume'); |
25 |
}, |
26 |
|
27 |
afterModel: function(model) { |
28 |
this.transitionTo('volume', model.get('firstObject').id); |
29 |
}, |
30 |
|
31 |
}); |
32 |
|
33 |
App.VolumeInfoRoute = Ember.Route.extend({ |
34 |
renderTemplate: function() { |
35 |
this.render('details/info'); |
36 |
}, |
37 |
model: function () { |
38 |
return this.modelFor("volume"); |
39 |
}, |
40 |
}); |
41 |
|
42 |
App.VolumeVmConnectedRoute = Ember.Route.extend({ |
43 |
renderTemplate: function() { |
44 |
this.render('details/disk-connected'); |
45 |
}, |
46 |
model: function () { |
47 |
return this.modelFor("volume"); |
48 |
} |
49 |
}); |