Revision 1901d1ce
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/models/network.js | ||
---|---|---|
4 | 4 |
status : DS.attr(), |
5 | 5 |
firewall : DS.attr(), |
6 | 6 |
vms : DS.hasMany('vm', { async:true }), |
7 |
ports : DS.hasMany('port', { async:false }), |
|
7 | 8 |
|
8 | 9 |
enabledActions: function() { |
9 | 10 |
return statusActionsNetwork[this.get('status')].enabledActions; |
... | ... | |
26 | 27 |
status: 'running', |
27 | 28 |
vms: [1,2], |
28 | 29 |
firewall: 'on', |
30 |
ports: [2,4], |
|
29 | 31 |
}, |
30 | 32 |
{ |
31 | 33 |
id: 2, |
... | ... | |
33 | 35 |
status: 'building', |
34 | 36 |
vms: [1,3], |
35 | 37 |
firewall: 'partial', |
38 |
ports: [1,3], |
|
36 | 39 |
}, |
37 | 40 |
{ |
38 | 41 |
id: 3, |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/models/port.js | ||
---|---|---|
1 | 1 |
App.Port = DS.Model.extend({ |
2 | 2 |
|
3 |
device_id : DS.belongsTo('vm', {async:true}),
|
|
4 |
network_id : DS.belongsTo('network', {async:true}),
|
|
3 |
vm : DS.belongsTo('vm', {async:true}),
|
|
4 |
network : DS.belongsTo('network', {async:true}), |
|
5 | 5 |
|
6 | 6 |
}); |
7 | 7 |
|
... | ... | |
9 | 9 |
App.Port.FIXTURES = [ |
10 | 10 |
{ |
11 | 11 |
id: 1, |
12 |
device_id: 1,
|
|
13 |
network_id: 1,
|
|
12 |
vm: 1,
|
|
13 |
network: 2,
|
|
14 | 14 |
}, |
15 | 15 |
{ |
16 | 16 |
id: 2, |
17 |
device_id: 1,
|
|
18 |
network_id: 1,
|
|
17 |
vm: 1,
|
|
18 |
network: 1, |
|
19 | 19 |
}, |
20 | 20 |
{ |
21 | 21 |
id: 3, |
22 |
device_id: 1, |
|
23 |
network_id: 1, |
|
22 |
vm: 2, |
|
23 |
network: 2, |
|
24 |
}, |
|
25 |
{ |
|
26 |
id: 4, |
|
27 |
vm: 3, |
|
28 |
network: 1, |
|
24 | 29 |
}, |
25 | 30 |
]; |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/models/vm.js | ||
---|---|---|
45 | 45 |
networks: [1], |
46 | 46 |
tags: [4,5,6], |
47 | 47 |
volumes: [3], |
48 |
ports: [1,2,3]
|
|
48 |
ports: [3],
|
|
49 | 49 |
}, |
50 | 50 |
{ |
51 | 51 |
id: 3, |
... | ... | |
55 | 55 |
link: 'http://www.in.gr', |
56 | 56 |
networks: [2], |
57 | 57 |
tags: [7], |
58 |
ports: [4], |
|
58 | 59 |
}, |
59 | 60 |
{ |
60 | 61 |
id: 4, |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/templates/details/network-connected.hbs | ||
---|---|---|
1 | 1 |
{{#details-content id="network-connected" class="connected network"}} |
2 |
{{view App.NetworksListView}} |
|
2 |
{{view App.NetworksListView}}
|
|
3 | 3 |
<section class="connect-new network"> |
4 | 4 |
<div class="img-wrap"> |
5 | 5 |
<a href="" data-reveal-id="connect-to-network"> |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/templates/dettach-volume-modal.hbs | ||
---|---|---|
1 | 1 |
{{#reveal-modal id="dettach-volume-modal" hasButtons="true" ok="dettachVolume" param=model}} |
2 |
<p>Are you sure you want to dettach this Volume from {{model.get('vm').name}}? </p>
|
|
2 |
<p>Are you sure you want to dettach this Volume? </p> |
|
3 | 3 |
{{/reveal-modal}} |
b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/templates/networks-list.hbs | ||
---|---|---|
1 |
{{#each network in this.networks}} |
|
2 |
{{network-el item=network}} |
|
3 |
{{/each}} |
|
4 |
|
|
5 |
{{!-- {{icon}} --}} |
|
6 |
<!--SOS, edw pairnei gia contoller, ton controller tou vm--> |
|
1 |
{{#each port in this.ports}} |
|
2 |
{{network-el item=port.network}} |
|
3 |
{{/each}} |
Also available in: Unified diff