root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / ember / routes / volume.js @ 74c8da56
History | View | Annotate | Download (1.1 kB)
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 |
this.render('temp-tabs-details-volume', { |
18 |
into: 'details', |
19 |
outlet: 'tabs-details', |
20 |
controller: 'volumes', |
21 |
}); |
22 |
}, |
23 |
|
24 |
}); |
25 |
|
26 |
|
27 |
App.VolumeinitRoute = Ember.Route.extend({ |
28 |
|
29 |
model: function(){ |
30 |
return this.store.find('volume'); |
31 |
}, |
32 |
|
33 |
afterModel: function(model) { |
34 |
this.transitionTo('volume', model.get('firstObject').id); |
35 |
}, |
36 |
|
37 |
}); |
38 |
|
39 |
App.VolumeInfoRoute = Ember.Route.extend({ |
40 |
renderTemplate: function() { |
41 |
this.render('details/info'); |
42 |
}, |
43 |
model: function () { |
44 |
return this.modelFor("volume"); |
45 |
}, |
46 |
}); |
47 |
|
48 |
App.VolumeVmConnectedRoute = Ember.Route.extend({ |
49 |
renderTemplate: function() { |
50 |
this.render('details/disk-connected'); |
51 |
}, |
52 |
model: function () { |
53 |
return this.modelFor("volume"); |
54 |
} |
55 |
}); |