root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / ember / router.js @ f29f1023
History | View | Annotate | Download (760 Bytes)
1 |
// if the path is the same as the resource name, there is no need to
|
---|---|
2 |
// specify it.
|
3 |
|
4 |
|
5 |
/*
|
6 |
* There is a problem if the menu is generated dynamically.
|
7 |
* The various components are defined in application.js, but must also be
|
8 |
* declared in router.js file
|
9 |
* TODO: Look for a better solution
|
10 |
*/
|
11 |
UI.Router.map(function () {
|
12 |
this.resource('index', { path: '/' }); |
13 |
this.resource('vms'); |
14 |
this.resource('networks'); |
15 |
this.resource('disks'); |
16 |
this.resource('images'); |
17 |
this.resource('snapshots'); |
18 |
}); |
19 |
|
20 |
|
21 |
UI.VmsRoute = Ember.Route.extend({ |
22 |
model: function() { |
23 |
return vms;
|
24 |
} |
25 |
}); |
26 |
|
27 |
UI.NetworksRoute = Ember.Route.extend({ |
28 |
model: function() { |
29 |
return networks;
|
30 |
} |
31 |
}); |
32 |
|
33 |
|
34 |
UI.DisksRoute = Ember.Route.extend({ |
35 |
model: function() { |
36 |
return disks;
|
37 |
} |
38 |
}); |