root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / okeanos-ember / obj.js @ b3523ce4
History | View | Annotate | Download (2.1 kB)
1 |
|
---|---|
2 |
|
3 |
Okeanos.Account = DS.Model.extend({ |
4 |
email: DS.attr('string') |
5 |
}); |
6 |
|
7 |
// CHECK can i use a single obj and not an array of obj
|
8 |
Okeanos.Account.FIXTURES = [{ |
9 |
id: 001, |
10 |
email: "athina@mail.com" |
11 |
}]; |
12 |
|
13 |
|
14 |
|
15 |
Okeanos.Vm = DS.Model.extend({ |
16 |
// id: DS.attr('number'), we do not define it ;)
|
17 |
name: DS.attr('string'), |
18 |
hostname: DS.attr('string'), |
19 |
status: DS.attr('string'), |
20 |
os: DS.attr()
|
21 |
}); |
22 |
|
23 |
Okeanos.Vm.FIXTURES = |
24 |
[{ |
25 |
id: 125355, |
26 |
name: "web-server", |
27 |
hostname: "user@snf-38389.vm.okeanos.grnet.gr", |
28 |
status: "running", |
29 |
os: "kubuntu" |
30 |
}, |
31 |
{ |
32 |
id: 12, |
33 |
name: "another-server", |
34 |
hostname: "user@snf-33333.vm.okeanos.grnet.gr", |
35 |
status: "off", |
36 |
os: "fedora" |
37 |
}]; |
38 |
|
39 |
Okeanos.Net = DS.Model.extend({ |
40 |
name: DS.attr('string'), |
41 |
status: DS.attr('string'), |
42 |
vms: DS.attr(),
|
43 |
ips: DS.attr()
|
44 |
}); |
45 |
|
46 |
Okeanos.Net.FIXTURES = |
47 |
[{ |
48 |
|
49 |
}]; |
50 |
|
51 |
|
52 |
|
53 |
|
54 |
Okeanos.places = [{ |
55 |
destination: "vms", |
56 |
title: "Virtual Machines", |
57 |
icon: "snf-pc-outline" |
58 |
}, |
59 |
{ |
60 |
destination: "nets", |
61 |
title: "Network", |
62 |
icon: "snf-network-outline" |
63 |
|
64 |
}, |
65 |
{ |
66 |
destination: "volumes", |
67 |
title: "Volumes", |
68 |
icon: "snf-volume-outline" |
69 |
}, |
70 |
{ |
71 |
destination: "pithos", |
72 |
title: "Pithos", |
73 |
icon: "snf-pithos-outline" |
74 |
}, |
75 |
{ |
76 |
destination: "images", |
77 |
title: "Images", |
78 |
icon: "snf-image-outline" |
79 |
}, |
80 |
{ |
81 |
destination: "snapshots", |
82 |
title: "Snapshots", |
83 |
icon: "snf-snapshot-outline" |
84 |
}, |
85 |
{ |
86 |
destination: "ips", |
87 |
title: "IPs", |
88 |
icon: "snf-nic-outline" |
89 |
}, |
90 |
{ |
91 |
destination: "sshkeys", |
92 |
title: "SSh Keys", |
93 |
icon: "snf-key-outline" |
94 |
}]; |
95 |
|
96 |
|
97 |
Okeanos.AllActions = [{ |
98 |
description:'start', |
99 |
'snf-components':['vms'], |
100 |
'enabled-status': ['off'], |
101 |
action: 'is this a function?' |
102 |
}, |
103 |
{ |
104 |
description:'destroyElement', |
105 |
'snf-components': ['vms', 'nets'], |
106 |
'enabled-status': ['all'], |
107 |
action: 'is this a function?', |
108 |
}, |
109 |
{ |
110 |
description:'shutdown', |
111 |
'snf-components': ['vms'], |
112 |
'enabled-status': ['running'], |
113 |
action: 'is this a function?' |
114 |
}, |
115 |
{ |
116 |
description:'add machine', |
117 |
'snf-components': ['nets'], |
118 |
'enabled-status': ['active'], |
119 |
action: 'is this a function?' |
120 |
}, |
121 |
{ |
122 |
description:'action for all', |
123 |
'snf-components': ['vms', 'nets'], |
124 |
'enabled-status': ['all'], |
125 |
action: 'is this a function?' |
126 |
}] |