Revision 361379fe snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/okeanos-ember/obj.js
b/snf-cyclades-app/synnefo/ui/new_ui/ui/javascripts/okeanos-ember/obj.js | ||
---|---|---|
1 | 1 |
Ember.Inflector.inflector.uncountable('account'); |
2 | 2 |
|
3 |
Okeanos.Account = DS.Model.extend({
|
|
3 |
Synnefo.Account = DS.Model.extend({
|
|
4 | 4 |
email: DS.attr('string') |
5 | 5 |
}); |
6 | 6 |
|
7 | 7 |
// CHECK can i use a single obj and not an array of obj |
8 |
Okeanos.Account.FIXTURES = {
|
|
8 |
Synnefo.Account.FIXTURES = {
|
|
9 | 9 |
id: 001, |
10 | 10 |
email: "athina@mail.com" |
11 | 11 |
}; |
12 | 12 |
|
13 | 13 |
|
14 | 14 |
|
15 |
Okeanos.Vm = DS.Model.extend({
|
|
15 |
Synnefo.Vm = DS.Model.extend({
|
|
16 | 16 |
// id: DS.attr('number'), we do not define it ;) |
17 | 17 |
name: DS.attr('string'), |
18 | 18 |
hostname: DS.attr('string'), |
... | ... | |
20 | 20 |
os: DS.attr() |
21 | 21 |
}); |
22 | 22 |
|
23 |
Okeanos.Vm.FIXTURES =
|
|
23 |
Synnefo.Vm.FIXTURES =
|
|
24 | 24 |
[{ |
25 | 25 |
id: 125355, |
26 | 26 |
name: "web-server", |
... | ... | |
36 | 36 |
os: "fedora" |
37 | 37 |
}]; |
38 | 38 |
|
39 |
Okeanos.Net = DS.Model.extend({
|
|
39 |
Synnefo.Network = DS.Model.extend({
|
|
40 | 40 |
name: DS.attr('string'), |
41 | 41 |
status: DS.attr('string'), |
42 |
vms: DS.attr(), |
|
43 |
ips: DS.attr() |
|
44 | 42 |
}); |
45 | 43 |
|
46 |
Okeanos.Net.FIXTURES =
|
|
44 |
Synnefo.Network.FIXTURES =
|
|
47 | 45 |
[{ |
48 |
|
|
46 |
id: 11, |
|
47 |
name: 'Network-1', |
|
48 |
status: 'running' |
|
49 |
}, |
|
50 |
{ |
|
51 |
id: 22, |
|
52 |
name: 'Network-2', |
|
53 |
status: 'error' |
|
49 | 54 |
}]; |
50 | 55 |
|
51 | 56 |
|
57 |
Synnefo.Volume = DS.Model.extend({ |
|
58 |
name: DS.attr('string'), |
|
59 |
status: DS.attr('string'), |
|
60 |
}); |
|
52 | 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 |
}); |
|
53 | 78 |
|
54 |
Okeanos.places = [{ |
|
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: [{ |
|
55 | 112 |
destination: "vms", |
56 | 113 |
title: "Virtual Machines", |
57 | 114 |
icon: "snf-pc-outline" |
... | ... | |
91 | 148 |
destination: "sshkeys", |
92 | 149 |
title: "SSh Keys", |
93 | 150 |
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 |
}] |
|
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 |
}; |
Also available in: Unified diff