Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / ember / routes / vm.js @ 6bf34226

History | View | Annotate | Download (635 Bytes)

1
App.VmRoute = Ember.Route.extend({
2

    
3
    redirect: function() {
4
       this.transitionTo('vm.info'); 
5
    },
6

    
7
    renderTemplate: function() {
8
        this.render('vm');
9

    
10
        this.render('lt-bar', {
11
          into: 'vm',
12
          outlet: 'lt-bar',
13
          controller: 'vms',
14
        });
15

    
16
/*        this.render('test', {
17
          into: 'item',
18
          outlet: 'test',
19
          controller: 'vm',
20
        });*/
21
    }
22

    
23
});
24

    
25

    
26
App.VminitRoute = Ember.Route.extend({
27

    
28
  model: function(params){
29
    return this.store.find('vm');
30
  },
31

    
32
  afterModel: function(model) {
33
    this.transitionTo('vm', model.get('firstObject').id);
34
  }
35
});