Revision 0e2122e7 snf-cyclades-app/synnefo/ui/new_ui/ui/app/models/network.js
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/models/network.js | ||
---|---|---|
1 |
App.Network = DS.Model.extend({ |
|
2 |
|
|
3 |
name : DS.attr(), |
|
4 |
status : DS.attr(), |
|
5 |
ports : DS.hasMany('port', { async:true }), |
|
6 |
|
|
7 |
enabledActions: function() { |
|
8 |
return statusActionsNetwork[this.get('status')].enabledActions; |
|
9 |
}.property('status'), |
|
10 |
|
|
11 |
}); |
|
12 |
|
|
13 |
|
|
14 |
App.Network.FIXTURES = [ |
|
15 |
{ |
|
16 |
id: 1, |
|
17 |
name: 'Network 1', |
|
18 |
status: 'running', |
|
19 |
ports: [1,3,4,6], |
|
20 |
}, |
|
21 |
{ |
|
22 |
id: 2, |
|
23 |
name: 'Network 2', |
|
24 |
status: 'building', |
|
25 |
ports: [2,5], |
|
26 |
}, |
|
27 |
{ |
|
28 |
id: 3, |
|
29 |
name: 'Network 3', |
|
30 |
status: 'off', |
|
31 |
}, |
|
32 |
]; |
Also available in: Unified diff