root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / okeanos-ember / obj.js @ 361379fe
History | View | Annotate | Download (3 kB)
1 |
Ember.Inflector.inflector.uncountable('account');
|
---|---|
2 |
|
3 |
Synnefo.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 |
Synnefo.Account.FIXTURES = { |
9 |
id: 001, |
10 |
email: "athina@mail.com" |
11 |
}; |
12 |
|
13 |
|
14 |
|
15 |
Synnefo.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 |
Synnefo.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 |
Synnefo.Network = DS.Model.extend({ |
40 |
name: DS.attr('string'), |
41 |
status: DS.attr('string'), |
42 |
}); |
43 |
|
44 |
Synnefo.Network.FIXTURES = |
45 |
[{ |
46 |
id: 11, |
47 |
name: 'Network-1', |
48 |
status: 'running' |
49 |
}, |
50 |
{ |
51 |
id: 22, |
52 |
name: 'Network-2', |
53 |
status: 'error' |
54 |
}]; |
55 |
|
56 |
|
57 |
Synnefo.Volume = DS.Model.extend({ |
58 |
name: DS.attr('string'), |
59 |
status: DS.attr('string'), |
60 |
}); |
61 |
|
62 |
Synnefo.Volume.FIXTURES = |
63 |
[{ |
64 |
id: 111, |
65 |
name: 'Volume-1', |
66 |
status: 'running' |
67 |
}, |
68 |
{ |
69 |
id: 222, |
70 |
name: 'Volume-2', |
71 |
status: 'building' |
72 |
}]; |
73 |
|
74 |
Synnefo.Snapshot = DS.Model.extend({ |
75 |
name: DS.attr('string'), |
76 |
status: DS.attr('string'), |
77 |
}); |
78 |
|
79 |
Synnefo.Snapshot.FIXTURES = |
80 |
[{ |
81 |
id: 33, |
82 |
name: 'Snapshot-1', |
83 |
status: 'running' |
84 |
}, |
85 |
{ |
86 |
id: 44, |
87 |
name: 'Snapshot-2', |
88 |
status: 'building' |
89 |
}]; |
90 |
|
91 |
|
92 |
Synnefo.UserImage = DS.Model.extend({ |
93 |
name: DS.attr('string'), |
94 |
status: DS.attr('string'), |
95 |
}); |
96 |
|
97 |
Synnefo.UserImage.FIXTURES = |
98 |
[{ |
99 |
id: 55, |
100 |
name: 'Image-1', |
101 |
status: 'running' |
102 |
}, |
103 |
{ |
104 |
id: 66, |
105 |
name: 'Image-2', |
106 |
status: 'running' |
107 |
}]; |
108 |
|
109 |
|
110 |
Synnefo.conf = { |
111 |
sectors: [{
|
112 |
destination: "vms", |
113 |
title: "Virtual Machines", |
114 |
icon: "snf-pc-outline" |
115 |
}, |
116 |
{ |
117 |
destination: "nets", |
118 |
title: "Network", |
119 |
icon: "snf-network-outline" |
120 |
|
121 |
}, |
122 |
{ |
123 |
destination: "volumes", |
124 |
title: "Volumes", |
125 |
icon: "snf-volume-outline" |
126 |
}, |
127 |
{ |
128 |
destination: "pithos", |
129 |
title: "Pithos", |
130 |
icon: "snf-pithos-outline" |
131 |
}, |
132 |
{ |
133 |
destination: "images", |
134 |
title: "Images", |
135 |
icon: "snf-image-outline" |
136 |
}, |
137 |
{ |
138 |
destination: "snapshots", |
139 |
title: "Snapshots", |
140 |
icon: "snf-snapshot-outline" |
141 |
}, |
142 |
{ |
143 |
destination: "ips", |
144 |
title: "IPs", |
145 |
icon: "snf-nic-outline" |
146 |
}, |
147 |
{ |
148 |
destination: "sshkeys", |
149 |
title: "SSh Keys", |
150 |
icon: "snf-key-outline" |
151 |
}], |
152 |
userActions: [{
|
153 |
description:'start', |
154 |
'snf-components':['vms'], |
155 |
'enabled-status': ['off'], |
156 |
action: 'is this a function?' |
157 |
}, |
158 |
{ |
159 |
description:'destroyElement', |
160 |
'snf-components': ['vms', 'nets'], |
161 |
'enabled-status': ['all'], |
162 |
action: 'is this a function?', |
163 |
}, |
164 |
{ |
165 |
description:'shutdown', |
166 |
'snf-components': ['vms'], |
167 |
'enabled-status': ['running'], |
168 |
action: 'is this a function?' |
169 |
}, |
170 |
{ |
171 |
description:'add machine', |
172 |
'snf-components': ['nets'], |
173 |
'enabled-status': ['active'], |
174 |
action: 'is this a function?' |
175 |
}, |
176 |
{ |
177 |
description:'action for all', |
178 |
'snf-components': ['vms', 'nets'], |
179 |
'enabled-status': ['all'], |
180 |
action: 'is this a function?' |
181 |
}] |
182 |
}; |