Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / okeanos-ember.js @ 0467b6cd

History | View | Annotate | Download (69.4 kB)

1
Ember.Handlebars.helper('bytesToGbytes', function(bytes) {
2
        var bytesInt = parseInt(bytes);
3
        var gigabytes = bytesInt/Math.pow(1024, 3);
4
        var output = parseFloat(Math.round(gigabytes * 100) / 100).toFixed(2);
5
        // var output = parseFloat(Math.round(gigabytes * 100) / 100).toFixed(2);
6
        return Handlebars.Utils.escapeExpression(output+' GB');
7
}, 'bytes');;/* Init Application */
8

    
9
window.Synnefo = Ember.Application.create({
10
        currentPath: 'vms',
11
         LOG_TRANSITIONS: true, // To have Ember write out transition events to the log (it can be helpful to see exactly what is going on with the router)
12
});
13

    
14
Synnefo.ApplicationAdapter = DS.FixtureAdapter.extend();
15
Synnefo.RawTransform = DS.Transform.extend({
16
        deserialize: function(serialized) {
17
                return serialized;
18
        },
19
        serialize: function(deserialized){
20
                return deserialized;
21
        }
22
});/* Objects */
23

    
24
/*
25
to do: config = new Ember.object();
26
*/
27

    
28

    
29
Ember.Inflector.inflector.uncountable('account');
30

    
31
Synnefo.Account = DS.Model.extend({
32
  email: DS.attr('string'),
33
        uuid: DS.attr('string')
34
});
35

    
36
// CHECK can i use a single obj and not an array of obj
37
Synnefo.Account.FIXTURES = [{
38
  id: 001,
39
        email: "athina@mail.com",
40
  uuid: '7bba5b8d-8bac-495f-be44-9da88c8ef41a'
41
}];
42

    
43

    
44

    
45
Synnefo.Vm = DS.Model.extend({
46
        // id: DS.attr('number'),        we do not define it
47
        name: DS.attr('string'),
48
        hostname: DS.attr('string'),
49
        status: DS.attr('string'),
50
        os: DS.attr()
51
});
52

    
53
Synnefo.Vm.FIXTURES =
54
[{
55
        id: 125355,
56
        name: "web-server",
57
        hostname: "user@snf-38389.vm.okeanos.grnet.gr",
58
        status: "running",
59
        os: "kubuntu"
60
},
61
{
62
        id: 12,
63
        name: "another-server",
64
        hostname: "user@snf-33333.vm.okeanos.grnet.gr",
65
        status: "off",
66
        os: "fedora"
67
}];
68

    
69
Synnefo.Network = DS.Model.extend({
70
        name: DS.attr('string'),
71
        status: DS.attr('string'),
72
});
73

    
74
Synnefo.Network.FIXTURES =
75
[{
76
  id: 11,
77
  name: 'Network-1',
78
  status: 'running'
79
},
80
{
81
  id: 22,
82
  name: 'Network-2',
83
  status: 'error'
84
}];
85

    
86

    
87
Synnefo.Volume = DS.Model.extend({
88
  name: DS.attr('string'),
89
  status: DS.attr('string'),
90
});
91

    
92
Synnefo.Volume.FIXTURES =
93
[{
94
  id: 111,
95
  name: 'Volume-1',
96
  status: 'running'
97
},
98
{
99
  id: 222,
100
  name: 'Volume-2',
101
  status: 'building'
102
}];
103

    
104
Synnefo.Snapshot = DS.Model.extend({
105
  name: DS.attr('string'),
106
  status: DS.attr('string'),
107
});
108

    
109
Synnefo.Snapshot.FIXTURES =
110
[{
111
  id: 33,
112
  name: 'Snapshot-1',
113
  status: 'running'
114
},
115
{
116
  id: 44,
117
  name: 'Snapshot-2',
118
  status: 'building'
119
}];
120

    
121
// included some properties of the received json
122
Synnefo.Image = DS.Model.extend({
123
  name: DS.attr(),
124
  status: DS.attr(),
125
  disk_format: DS.attr(),
126
  size: DS.attr('number'),
127
  created_at: DS.attr(),// should be date
128
  updated_at: DS.attr(),// should be date
129
  deleted_at: DS.attr(),// should be date
130
  is_public: DS.attr('boolean'),
131
  sortorder: DS.attr('number'),
132
  properties: DS.attr('raw')
133
  /*
134
    properties include:
135
    partition_table
136
    kernel
137
    osfamily
138
    users // maybe more than one
139
    gui
140
    sortorder
141
    os
142
    root_partition
143
    description
144
  */
145
});
146

    
147

    
148
//  Synnefo.UserImage should be subset of Synnefo.Image
149
Synnefo.UserImage = DS.Model.extend({
150
  name: DS.attr('string'),
151
  status: DS.attr('string'),
152
});
153

    
154
Synnefo.UserImage.FIXTURES =
155
[{
156
  id: 55,
157
  name: 'Image-1',
158
  status: 'running'
159
},
160
{
161
  id: 66,
162
  name: 'Image-2',
163
  status: 'running'
164
}];
165

    
166

    
167
Synnefo.conf = {
168
  sectors: [{
169
    destination: "vms",
170
    title: "Virtual Machines",
171
    icon: "snf-pc-outline"
172
  },
173
  {
174
    destination: "networks",
175
    title: "Network",
176
    icon: "snf-network-outline"
177

    
178
  },
179
  {
180
    destination: "volumes",
181
    title: "Volumes",
182
    icon: "snf-volume-outline"
183
  },
184
  {
185
    destination: "pithos",
186
    title: "Pithos",
187
    icon: "snf-pithos-outline"
188
  },
189
  {
190
    destination: "images",
191
    title: "Images",
192
    icon: "snf-image-outline"
193
  },
194
  {
195
    destination: "snapshots",
196
    title: "Snapshots",
197
    icon: "snf-snapshot-outline"
198
  },
199
  {
200
    destination: "ips",
201
    title: "IPs",
202
    icon: "snf-nic-outline"
203
  },
204
  {
205
    destination: "sshkeys",
206
    title: "SSh Keys",
207
    icon: "snf-key-outline"
208
  }],
209

    
210
  userActions: [{
211
    description:'start',
212
    'snf-components':['vms'],
213
    'enabled-status': ['off'],
214
    action: 'is this a function?'
215
  },
216
  {
217
    description:'destroyElement',
218
    'snf-components': ['vms','networks'],
219
    'enabled-status': ['all'],
220
    action: 'is this a function?',
221
  },
222
  {
223
    description:'shutdown',
224
    'snf-components': ['vms'],
225
    'enabled-status': ['running'],
226
    action: 'is this a function?'
227
  },
228
  {
229
    description:'add machine',
230
    'snf-components': ['networks'],
231
    'enabled-status': ['active'],
232
    action: 'is this a function?'
233
  },
234
  {
235
    description:'action for all',
236
    'snf-components': ['vms','networks'],
237
    'enabled-status': ['all'],
238
    action: 'is this a function?'
239
}]
240
};
241

    
242
Synnefo.wizards = {
243
  vmWizard: Ember.Object.create({
244
    // each step must have a headline
245
    stepsHeadlines: [
246
        {
247
          title:'Select an OS',
248
          subtitle:'Choose your preferred image'
249
        },
250
        {
251
          title:'Select CPUs,RAM and Disk Size',
252
          subtitle:'Available options are filtered based on the selected image'
253
        },
254
        {
255
          title:'Virtual machine custom options',
256
          subtitle:'tba'
257
        },
258
        {
259
          title:'Confirm your settings',
260
          subtitle:'Confirm that the options you have selected are correct'
261
        },
262
    ],
263
    stepsSubmenus: [
264
      {
265
        options:['System','My images','Shared with me','Public',] // could the snapshots be part of this list?
266
      },
267
      {
268
        options: ['Small','Medium','large']
269
      }
270
    ],
271
    stepsContent: ['step-1','step-2','step-3','step-4']
272
  }),
273
  networkWizard: {}
274
};
275

    
276

    
277
Synnefo.SystemUUIDs = ['25ecced9-bf53-4145-91ee-cf47377e9fb2','temp-system-id'];
278

    
279
// accounts that have published an image or they have shared it with the current user
280
Synnefo.AccountsUUIDs = Ember.Object.create({
281
"1dc6f624-cf11-473a-8a18-ed9171e47023": "p11mour@ionio.gr",
282
"4b6c2887-0a14-4a4b-bfaf-d665ca70dff8": "cargious@gmail.com",
283
"7c1adab8-7b7f-4b27-9f5d-423629ecc05d": "occi-test@grnet.gr",
284
"7e271a0b-1427-45ec-9916-f8e72bfbf3d4": "joko@microlab.ntua.gr",
285
"8ce17bf9-5b1d-425a-adb0-d415e29df1d3": "markeleas@gmail.com",
286
"9ac455ec-21aa-427d-8c11-2b34faa8e006": "mte1115@webmail.unipi.gr",
287
"23f92921-cef9-4aca-b74d-448628380949": "czalidis@auth.gr",
288
"25ecced9-bf53-4145-91ee-cf47377e9fb2": "images@okeanos.grnet.gr",
289
"41a38154-55fb-48ca-a8ad-5652265dc7da": "xrg@hellug.gr",
290
"66a0f15a-69ce-4a18-8177-2343da55c2e1": "alexakis@imis.athena-innovation.gr",
291
"82a704cd-8874-4302-ae16-7c7221bdfb57": "dimiarme2@tesyd.teimes.gr",
292
"309cf993-79be-4aed-b335-9f98ff79800d": "pplatis1@teilam.gr",
293
"472ca914-0a88-4bc8-ab5e-72d49e5d51eb": "panagiotious@gmail.com",
294
"607bc20e-ae01-46ca-8a7d-d37b92e9908f": "vergoulis@imis.athena-innovation.gr",
295
"00759b1d-a20e-439a-99ad-f11a91ba68e6": "stmoros@gmail.com",
296
"70083b2f-afa0-4514-b98b-5fd754de59b9": "el08092@central.ntua.gr",
297
"51819571-6e2e-429e-8ffe-0f1999acbc1c": "cmantas@cslab.ece.ntua.gr",
298
"a3ff8143-4586-4910-aeb3-6e68f3d32c13": "kkoum@admin.grnet.gr",
299
"a504f156-7660-4793-a23f-ea0bbee748e9": "knikas@cslab.ece.ntua.gr",
300
"ae458ae3-b92e-479f-8aa4-8c3e257c902a": "frozenarena@gmail.com",
301
"c3eb14d6-ed97-4b00-8b68-7ccecad73f37": "stefmal@unipi.gr",
302
"c996c4e2-28dc-4d8a-a8e7-bfc6830cb1f6": "ok0-burnin@okeanos.grnet.gr",
303
"d4a583cb-444e-4bb7-a588-fa1134c23efc": "ggian@cslab.ntua.gr",
304
"d098aa00-f56c-4cc0-8abe-7ed5b9a4bf2a": "cse36860@stef.teipir.gr",
305
"ddbaf544-9874-4007-833e-0547bd8c6bf1": "ar07065@central.ntua.gr",
306
"e472fd72-4ec8-428f-a9f1-8ce9f768de09": "imoustakas@teleinfom.teiep.gr",
307
"f782c65e-b9e7-47fc-8ed0-6cc11e7658e8": "efloros@grnet.gr",
308
"f1380d5a-7d53-427a-a255-5fdd50c8c983": "antonismanousis@gmail.com",
309
"fac4a96c-1fed-4f93-92f6-5b4b268f9351": "ge03163@mail.ntua.gr"
310
});
311

    
312

    
313

    
314
Synnefo.Image.FIXTURES =
315
[
316
{
317
"status": "available",
318
"name": "CentOS",
319
"checksum": "1cd682b9b56a4e13e41fc6626474b8e038036808dfe1ec862c642d4362658ef0",
320
"created_at": "2014-02-24 15:59:15",
321
"disk_format": "diskdump",
322
"updated_at": "2014-02-24 15:59:15",
323
"properties": {
324
"partition_table": "msdos",
325
"kernel": "2.6.32",
326
"osfamily": "linux",
327
"users": "root",
328
"gui": "No GUI",
329
"sortorder": "6",
330
"os": "centos",
331
"root_partition": "1",
332
"description": "CentOS release 6.5 (Final)"
333
},
334
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/centos-6.x-14-x86_64.diskdump",
335
"container_format": "bare",
336
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
337
"is_public": true,
338
"deleted_at": "",
339
"id": "bace133d-4d1f-40aa-a495-1a1d7d5c1726",
340
"size": 709644288
341
},
342
{
343
"status": "available",
344
"name": "FreeBSD",
345
"checksum": "ab99fcf5ab7c9903ff3b8d3ea134b356aebd54bc07aa25c81b12850e81071930",
346
"created_at": "2014-02-24 13:07:12",
347
"disk_format": "diskdump",
348
"updated_at": "2014-02-24 13:07:12",
349
"properties": {
350
"partition_table": "gpt",
351
"kernel": "FreeBSD 9.2-RELEASE",
352
"osfamily": "freebsd",
353
"users": "root",
354
"gui": "No GUI",
355
"sortorder": "10",
356
"os": "freebsd",
357
"root_partition": "2",
358
"description": "FreeBSD 9.2-RELEASE (GENERIC)"
359
},
360
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/freebsd-9.2-2-x86_64.diskdump",
361
"container_format": "bare",
362
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
363
"is_public": true,
364
"deleted_at": "",
365
"id": "2da09920-20c1-4f48-ac04-e5e18029ca0c",
366
"size": 1610612736
367
},
368
{
369
"status": "available",
370
"name": "OpenSUSE",
371
"checksum": "542597ba73388ddcc5752437e810a1b9b1a82912f063a70ab1ec0e757be55118",
372
"created_at": "2014-02-24 13:04:58",
373
"disk_format": "diskdump",
374
"updated_at": "2014-02-24 13:04:58",
375
"properties": {
376
"partition_table": "msdos",
377
"osfamily": "linux",
378
"users": "root user",
379
"gui": "KDE 4",
380
"sortorder": "9",
381
"os": "opensuse",
382
"root_partition": "1",
383
"description": "openSUSE 13.1 (x86_64)"
384
},
385
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/opensuse_desktop-13.1-3-x86_64.diskdump",
386
"container_format": "bare",
387
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
388
"is_public": true,
389
"deleted_at": "",
390
"id": "e1be6e12-2e18-4417-a49d-0e0bc189c141",
391
"size": 5204701184
392
},
393
{
394
"status": "available",
395
"name": "cassandra_deb_v3.3",
396
"checksum": "6d799ff55063bbc0b5a034340c461d06a25f639cbda30efc3314a2bc97309c72",
397
"created_at": "2014-02-24 11:58:01",
398
"disk_format": "diskdump",
399
"updated_at": "2014-02-24 11:58:01",
400
"properties": {
401
"partition_table": "msdos",
402
"osfamily": "linux",
403
"users": "root",
404
"exclude_task_deletesshkeys": "yes",
405
"exclude_task_addswap": "yes",
406
"os": "debian",
407
"root_partition": "1",
408
"description": "wheezy + java-1.7,cassandra-2.0,ycsb(+sin),ganglia"
409
},
410
"location": "pithos://51819571-6e2e-429e-8ffe-0f1999acbc1c/images/cassandra_base_v3.3.diskdump",
411
"container_format": "bare",
412
"owner": "51819571-6e2e-429e-8ffe-0f1999acbc1c",
413
"is_public": true,
414
"deleted_at": "",
415
"id": "4a9134b9-5e7b-471c-83dc-a091e11cd090",
416
"size": 1391607808
417
},
418
{
419
"status": "available",
420
"name": "Windows Server 2008R2",
421
"checksum": "07e8fdc61b5142beb40d22a420f80dcf839f5f4b9ddaa3ebd0c9ff6062fb6a30",
422
"created_at": "2014-02-18 08:25:56",
423
"disk_format": "diskdump",
424
"updated_at": "2014-02-18 08:25:56",
425
"properties": {
426
"partition_table": "msdos",
427
"kernel": "Windows NT Kernel",
428
"osfamily": "windows",
429
"users": "Administrator",
430
"gui": "Windows,Aero Theme",
431
"sortorder": "7",
432
"os": "windows",
433
"root_partition": "2",
434
"description": "Windows Server 2008 R2 Datacenter"
435
},
436
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/windows-2008R2-16-x86_64.diskdump",
437
"container_format": "bare",
438
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
439
"is_public": true,
440
"deleted_at": "",
441
"id": "e394efad-11cd-414b-a76d-6dcf245da919",
442
"size": 15439233024
443
},
444
{
445
"status": "available",
446
"name": "cassandra_deb_v3.2",
447
"checksum": "10303f9b358bd4c530196a3d86d049e1ca256ec736368ce73df32988073e723d",
448
"created_at": "2014-02-17 12:34:25",
449
"disk_format": "diskdump",
450
"updated_at": "2014-02-17 12:34:25",
451
"properties": {
452
"partition_table": "msdos",
453
"osfamily": "linux",
454
"description": "wheezy (7.3) + oracle java1.7,cassandra2.0,ycsb,ganglia,c-tool",
455
"os": "debian",
456
"root_partition": "1",
457
"users": "root"
458
},
459
"location": "pithos://51819571-6e2e-429e-8ffe-0f1999acbc1c/images/cassandra_deb_v3.2-201402171425.diskdump",
460
"container_format": "bare",
461
"owner": "51819571-6e2e-429e-8ffe-0f1999acbc1c",
462
"is_public": true,
463
"deleted_at": "",
464
"id": "440d9ca1-9132-4880-b96f-c7ebed5f3150",
465
"size": 1654947840
466
},
467
{
468
"status": "available",
469
"name": "Fedora",
470
"checksum": "ca37b5f75e4e2082ba3e7dff85645fe20d19606b44f8d0af630f81563a1c89be",
471
"created_at": "2014-02-13 11:03:54",
472
"disk_format": "diskdump",
473
"updated_at": "2014-02-13 11:03:54",
474
"properties": {
475
"partition_table": "msdos",
476
"kernel": "3.12.10",
477
"osfamily": "linux",
478
"users": "root user",
479
"gui": "MATE Desktop Environment 1.6.2",
480
"sortorder": "5",
481
"os": "fedora",
482
"root_partition": "2",
483
"description": "Fedora release 20 (Heisenbug)"
484
},
485
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/fedora-20-2-x86_64.diskdump",
486
"container_format": "bare",
487
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
488
"is_public": true,
489
"deleted_at": "",
490
"id": "04fa9ca6-7417-41a7-a20c-23a416b2b55c",
491
"size": 3522433024
492
},
493
{
494
"status": "available",
495
"name": "Debian Desktop",
496
"checksum": "e18d7ab60f4969e33bff3df22c8ee3cb4db95121744280efe6619c4de4462d13",
497
"created_at": "2014-02-10 17:39:46",
498
"disk_format": "diskdump",
499
"updated_at": "2014-02-10 17:39:46",
500
"properties": {
501
"partition_table": "msdos",
502
"kernel": "3.2.0",
503
"osfamily": "linux",
504
"users": "root user",
505
"gui": "GNOME 3.4",
506
"sortorder": "2",
507
"os": "debian",
508
"root_partition": "1",
509
"description": "Debian 7.4 (Wheezy) Desktop"
510
},
511
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/debian_desktop-7.0-3-x86_64.diskdump",
512
"container_format": "bare",
513
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
514
"is_public": true,
515
"deleted_at": "",
516
"id": "31773c86-46b4-420c-bd9e-d6f51535a902",
517
"size": 4044349440
518
},
519
{
520
"status": "available",
521
"name": "Debian Base",
522
"checksum": "5921d279415e13d1fcf278e3ffb302f7f4b2618cb6ba9a0d5b273ca1bbb8c0bc",
523
"created_at": "2014-02-10 17:03:46",
524
"disk_format": "diskdump",
525
"updated_at": "2014-02-10 17:03:46",
526
"properties": {
527
"partition_table": "msdos",
528
"kernel": "3.2.0",
529
"osfamily": "linux",
530
"users": "root",
531
"gui": "No GUI",
532
"sortorder": "1",
533
"os": "debian",
534
"root_partition": "1",
535
"description": "Debian 7.4 (Wheezy) Base System"
536
},
537
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/debian_base-7.0-3-x86_64.diskdump",
538
"container_format": "bare",
539
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
540
"is_public": true,
541
"deleted_at": "",
542
"id": "eb925e7d-63be-45a6-bc1c-fba9e74bc996",
543
"size": 570810368
544
},
545
{
546
"status": "available",
547
"name": "Debian Base (OldStable)",
548
"checksum": "be5b30830cda9e70951ea1e5e76a35334ea23da4615fdf6071f9a748fad8ee4b",
549
"created_at": "2014-02-10 16:45:33",
550
"disk_format": "diskdump",
551
"updated_at": "2014-02-10 16:45:33",
552
"properties": {
553
"partition_table": "msdos",
554
"kernel": "2.6.32",
555
"osfamily": "linux",
556
"users": "root",
557
"gui": "No GUI",
558
"sortorder": "1",
559
"os": "debian",
560
"root_partition": "1",
561
"description": "Debian 6.0.8 (Squeeze) Base System"
562
},
563
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/debian_base-6.0-13-x86_64.diskdump",
564
"container_format": "bare",
565
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
566
"is_public": true,
567
"deleted_at": "",
568
"id": "09b738a6-bf7e-4eae-b271-082d1081862c",
569
"size": 474664960
570
},
571
{
572
"status": "available",
573
"name": "mininet_netman2014",
574
"checksum": "3a35b40900493af100d0e6deb96aec7c99029a1cff694f838c22063faa38a2e6",
575
"created_at": "2014-02-03 18:30:50",
576
"disk_format": "diskdump",
577
"updated_at": "2014-02-03 18:30:50",
578
"properties": {
579
"partition_table": "msdos",
580
"osfamily": "linux",
581
"description": "Mininet 2.1.0 for NetMan 2014 lab",
582
"os": "ubuntu",
583
"root_partition": "1",
584
"users": "mininet root"
585
},
586
"location": "pithos://4b6c2887-0a14-4a4b-bfaf-d665ca70dff8/images/mininet_netman2014-201402031013.diskdump",
587
"container_format": "bare",
588
"owner": "4b6c2887-0a14-4a4b-bfaf-d665ca70dff8",
589
"is_public": true,
590
"deleted_at": "",
591
"id": "88e185c5-fd22-452a-943d-de230d4a3be9",
592
"size": 1851117568
593
},
594
{
595
"status": "available",
596
"name": "cassandra_base_v01",
597
"checksum": "600ec3523613183fd1ed66719c7791ddac3a7d6754d2c930de0ba32a7cfc7318",
598
"created_at": "2014-01-30 16:03:35",
599
"disk_format": "diskdump",
600
"updated_at": "2014-01-30 16:03:35",
601
"properties": {
602
"partition_table": "msdos",
603
"osfamily": "linux",
604
"users": "root user",
605
"swap": "5:1022",
606
"os": "ubuntu",
607
"root_partition": "1",
608
"description": "Ubuntu SVR 13.10 + java,cassandra,YCSB,ganglia"
609
},
610
"location": "pithos://51819571-6e2e-429e-8ffe-0f1999acbc1c/images/cassandra_base_v01-201401301753.diskdump",
611
"container_format": "bare",
612
"owner": "51819571-6e2e-429e-8ffe-0f1999acbc1c",
613
"is_public": true,
614
"deleted_at": "",
615
"id": "8f0dab5d-1f7d-4783-b3ef-005ef0677355",
616
"size": 2268602368
617
},
618
{
619
"status": "available",
620
"name": "mininet-test2",
621
"checksum": "5a4d3075414618555b5a0da1ce1a82d076c20379a2c15c1f4cb56981ea9fdc4b",
622
"created_at": "2014-01-28 15:44:34",
623
"disk_format": "diskdump",
624
"updated_at": "2014-01-28 15:44:34",
625
"properties": {
626
"partition_table": "msdos",
627
"osfamily": "linux",
628
"description": "Mininet on Ubuntu 13.04",
629
"os": "ubuntu",
630
"root_partition": "1",
631
"users": "mininet root"
632
},
633
"location": "pithos://4b6c2887-0a14-4a4b-bfaf-d665ca70dff8/images/mininet-test2-201401280735.diskdump",
634
"container_format": "bare",
635
"owner": "4b6c2887-0a14-4a4b-bfaf-d665ca70dff8",
636
"is_public": true,
637
"deleted_at": "",
638
"id": "f0ebd2e4-1a27-450e-8c83-e8d350c0dc24",
639
"size": 1851379712
640
},
641
{
642
"status": "available",
643
"name": "mininet-test1",
644
"checksum": "1e6d70d0d48cb93c4c40695ec75d4c973512da8bc82803ed4eecf1e5cd1a4402",
645
"created_at": "2014-01-28 14:26:12",
646
"disk_format": "diskdump",
647
"updated_at": "2014-01-28 14:26:12",
648
"properties": {
649
"partition_table": "msdos",
650
"osfamily": "linux",
651
"description": "Mininet on Ubuntu 13.04",
652
"os": "ubuntu",
653
"root_partition": "1",
654
"users": "mininet root"
655
},
656
"location": "pithos://4b6c2887-0a14-4a4b-bfaf-d665ca70dff8/images/mininet-test1-201401280618.diskdump",
657
"container_format": "bare",
658
"owner": "4b6c2887-0a14-4a4b-bfaf-d665ca70dff8",
659
"is_public": true,
660
"deleted_at": "",
661
"id": "726090b4-00d2-4f44-bb32-83429181bee3",
662
"size": 1848168448
663
},
664
{
665
"status": "available",
666
"name": "debian_ATDS_2014",
667
"checksum": "20d4ca674c216f2a36ad94bbe7b924e357490655871c399f3b2c4e9987a62312",
668
"created_at": "2014-01-28 11:23:54",
669
"disk_format": "diskdump",
670
"updated_at": "2014-01-28 11:23:54",
671
"properties": {
672
"partition_table": "msdos",
673
"osfamily": "linux",
674
"users": "root",
675
"swap": "5:466",
676
"os": "debian",
677
"root_partition": "1",
678
"description": "Image for ATDS 2014"
679
},
680
"location": "pithos://d4a583cb-444e-4bb7-a588-fa1134c23efc/images/debian_ATDS_2014-201401281318.diskdump",
681
"container_format": "bare",
682
"owner": "d4a583cb-444e-4bb7-a588-fa1134c23efc",
683
"is_public": true,
684
"deleted_at": "",
685
"id": "67f21595-ab0d-4af5-8974-b655b679a86a",
686
"size": 1208614912
687
},
688
{
689
"status": "available",
690
"name": "okeanos-is",
691
"checksum": "4fda6e3716e9b5bcc0a4a0707ea1eff68659777a4d4c636446fe6035e099f7f7",
692
"created_at": "2014-01-24 08:56:54",
693
"disk_format": "diskdump",
694
"updated_at": "2014-01-24 08:56:54",
695
"properties": {
696
"partition_table": "msdos",
697
"osfamily": "linux",
698
"description": "okeanos-is-on-centos",
699
"os": "centos",
700
"root_partition": "1",
701
"users": "root"
702
},
703
"location": "pithos://7c1adab8-7b7f-4b27-9f5d-423629ecc05d/images/okeanos-is-201401241028.diskdump",
704
"container_format": "bare",
705
"owner": "7c1adab8-7b7f-4b27-9f5d-423629ecc05d",
706
"is_public": true,
707
"deleted_at": "",
708
"id": "f00b0d29-62f4-46db-a78e-370d596fc553",
709
"size": 4442464256
710
},
711
{
712
"status": "available",
713
"name": "Windows Server 2012",
714
"checksum": "38b5424f9977a441861a20e82a78f86985fc579991245b682aacc04915e8f4db",
715
"created_at": "2014-01-23 09:35:02",
716
"disk_format": "diskdump",
717
"updated_at": "2014-01-23 09:35:02",
718
"properties": {
719
"partition_table": "msdos",
720
"kernel": "Windows NT Kernel",
721
"osfamily": "windows",
722
"users": "Administrator",
723
"gui": "Windows,Metro UI",
724
"sortorder": "8",
725
"os": "windows",
726
"root_partition": "2",
727
"description": "Windows Server 2012 Datacenter"
728
},
729
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/windows-2012-6-x86_64.diskdump",
730
"container_format": "bare",
731
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
732
"is_public": true,
733
"deleted_at": "",
734
"id": "09ff8272-3018-422f-a91f-386615ef0fb2",
735
"size": 15780020224
736
},
737
{
738
"status": "available",
739
"name": "HMMY-tools v1.0",
740
"checksum": "d21c6893df33d24afb10e348fc4bd93b538040b22b3d2608e461762b95970f23",
741
"created_at": "2014-01-22 16:25:59",
742
"disk_format": "diskdump",
743
"updated_at": "2014-01-22 16:25:59",
744
"properties": {
745
"partition_table": "msdos",
746
"osfamily": "linux",
747
"description": "Ubuntu 12.04 LTS with pre-installed tools for HMMY students",
748
"os": "ubuntu",
749
"root_partition": "1",
750
"users": "root user"
751
},
752
"location": "pithos://70083b2f-afa0-4514-b98b-5fd754de59b9/images/HMMY-tools v1.0-201401221736.diskdump",
753
"container_format": "bare",
754
"owner": "70083b2f-afa0-4514-b98b-5fd754de59b9",
755
"is_public": true,
756
"deleted_at": "",
757
"id": "430afb49-6471-425f-9aec-622ce41d7a5a",
758
"size": 8173547520
759
},
760
{
761
"status": "available",
762
"name": "xubuntu",
763
"checksum": "00751c6e170d493218725bd7485e8c1e1f034a85eb20db4bc924e90962676e82",
764
"created_at": "2014-01-17 15:50:34",
765
"disk_format": "diskdump",
766
"updated_at": "2014-01-17 15:50:34",
767
"properties": {
768
"partition_table": "msdos",
769
"osfamily": "linux",
770
"users": "user",
771
"swap": "5:1022",
772
"os": "ubuntu",
773
"root_partition": "1",
774
"description": "Xubuntu 13.10"
775
},
776
"location": "pithos://1dc6f624-cf11-473a-8a18-ed9171e47023/images/xubuntu-201401171739.diskdump",
777
"container_format": "bare",
778
"owner": "1dc6f624-cf11-473a-8a18-ed9171e47023",
779
"is_public": true,
780
"deleted_at": "",
781
"id": "2953ee6f-7dac-4173-9c13-19a0b87162f9",
782
"size": 2812469248
783
},
784
{
785
"status": "available",
786
"name": "Mageia-3",
787
"checksum": "64e117012f89154f5668b59e27f399768e218c60c50d6cd9ca5645466270bb75",
788
"created_at": "2014-01-16 20:53:57",
789
"disk_format": "diskdump",
790
"updated_at": "2014-01-16 20:53:57",
791
"properties": {
792
"partition_table": "msdos",
793
"osfamily": "linux",
794
"description": "Mageia 3",
795
"os": "mageia",
796
"root_partition": "1",
797
"users": "root user"
798
},
799
"location": "pithos://41a38154-55fb-48ca-a8ad-5652265dc7da/images/Mageia-3-x86_64.img",
800
"container_format": "bare",
801
"owner": "41a38154-55fb-48ca-a8ad-5652265dc7da",
802
"is_public": true,
803
"deleted_at": "",
804
"id": "ca446474-a846-45ab-b8b9-7bcd41e7c905",
805
"size": 909467136
806
},
807

    
808
{
809
"status": "available",
810
"name": "Openfiler ESA 2.99",
811
"checksum": "5ef6be48c689126cfb2c24c1c70f73a4dccb2f0e7ea173d1dee311970fad2d57",
812
"created_at": "2014-01-16 16:25:50",
813
"disk_format": "diskdump",
814
"updated_at": "2014-01-16 16:25:50",
815
"location": "pithos://ae458ae3-b92e-479f-8aa4-8c3e257c902a/images/openfiler-2.99-201401161810.diskdump",
816
"container_format": "bare",
817
"owner": "ae458ae3-b92e-479f-8aa4-8c3e257c902a",
818
"is_public": true,
819
"deleted_at": "",
820
"id": "890d0d9c-f9f6-4643-bc9d-f6eb387573a1",
821
"size": 1887083520,
822
"properties": {
823
  "partition_table": "msdos",
824
  "osfamily": "linux",
825
  "users": "root openfiler ofguest",
826
  "description": "Openfiler 2.99",
827
  "swap": "3:1028",
828
  "exclude_task_assignhostname": "yes",
829
  "os": "linux",
830
  "root_partition": "2",
831
  "password_hashing_method": "md5"
832
},
833
},
834

    
835

    
836
{
837
"status": "available",
838
"name": "NetBSD",
839
"checksum": "7dabf52d1632d3bcf83cbb89e4d1bfec715d184542dd8741b2d9f100d78f53fc",
840
"created_at": "2014-01-16 11:17:01",
841
"disk_format": "diskdump",
842
"updated_at": "2014-01-16 11:17:01",
843
"properties": {
844
"partition_table": "msdos",
845
"osfamily": "netbsd",
846
"users": "root",
847
"gui": "No GUI",
848
"sortorder": "12",
849
"os": "netbsd",
850
"root_partition": "1",
851
"description": "NetBSD 6.1.2 (GENERIC)"
852
},
853
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/netbsd-6.1-2-x86_64.diskdump",
854
"container_format": "bare",
855
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
856
"is_public": true,
857
"deleted_at": "",
858
"id": "1768283d-0034-4b27-a2e6-7063a3f5ab06",
859
"size": 5100273664
860
},
861
{
862
"status": "available",
863
"name": "OpenBSD",
864
"checksum": "db7135cb525adfd464c196c204aa0a096d6e8596b7c01ad27c9a7120ba4dc4e0",
865
"created_at": "2014-01-14 10:20:17",
866
"disk_format": "diskdump",
867
"updated_at": "2014-01-14 10:20:17",
868
"properties": {
869
"partition_table": "msdos",
870
"osfamily": "openbsd",
871
"users": "root",
872
"gui": "No GUI",
873
"sortorder": "11",
874
"os": "openbsd",
875
"root_partition": "4",
876
"description": "OpenBSD 5.4 (GENERIC)"
877
},
878
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/openbsd-5.4-2-x86_64.diskdump",
879
"container_format": "bare",
880
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
881
"is_public": true,
882
"deleted_at": "",
883
"id": "826db4a0-8ab1-45eb-b6fe-7c9a53a8a5b8",
884
"size": 5100273664
885
},
886
{
887
"status": "available",
888
"name": "Ubuntu Desktop LTS",
889
"checksum": "cdeb5be4eb282aed75389e8b2a9ea489cf277234a5f7502aa62debf73c184c91",
890
"created_at": "2013-12-19 14:16:43",
891
"disk_format": "diskdump",
892
"updated_at": "2013-12-19 14:16:43",
893
"properties": {
894
"partition_table": "msdos",
895
"kernel": "3.2.0",
896
"osfamily": "linux",
897
"users": "user",
898
"gui": "Unity 5.10",
899
"sortorder": "3",
900
"os": "ubuntu",
901
"root_partition": "1",
902
"description": "Ubuntu 12.04.3 LTS"
903
},
904
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/ubuntu_desktop-12.04-6-x86_64.diskdump",
905
"container_format": "bare",
906
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
907
"is_public": true,
908
"deleted_at": "",
909
"id": "57e4c30b-b7e8-44e8-ae93-16e4a6ebc11b",
910
"size": 2610372608
911
},
912
{
913
"status": "available",
914
"name": "Ubuntu Server",
915
"checksum": "15d960bd90784096a612aabb9cbdcab8ae1a9d8d5d847d20f4c416c8291727cd",
916
"created_at": "2013-12-19 10:48:39",
917
"disk_format": "diskdump",
918
"updated_at": "2013-12-19 10:48:39",
919
"properties": {
920
"partition_table": "msdos",
921
"kernel": "3.2.0",
922
"osfamily": "linux",
923
"users": "user",
924
"gui": "No GUI",
925
"sortorder": "3",
926
"os": "ubuntu",
927
"root_partition": "1",
928
"description": "Ubuntu 12.04.3 LTS"
929
},
930
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/ubuntu_server-12.04-7-x86_64.diskdump",
931
"container_format": "bare",
932
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
933
"is_public": true,
934
"deleted_at": "",
935
"id": "d77f6f3d-8935-4bae-86b8-48d039106f72",
936
"size": 1080287232
937
},
938
{
939
"status": "available",
940
"name": "Kubuntu",
941
"checksum": "72ee40c0c66451227f07f6d6213274cf899e9f8cb492033d20ccbdfa0fdb7bdc",
942
"created_at": "2013-12-11 09:45:50",
943
"disk_format": "diskdump",
944
"updated_at": "2013-12-11 09:45:50",
945
"properties": {
946
"partition_table": "msdos",
947
"kernel": "3.11.0",
948
"osfamily": "linux",
949
"users": "user",
950
"gui": "KDE 4.11.2",
951
"sortorder": "4",
952
"os": "kubuntu",
953
"root_partition": "1",
954
"description": "Kubuntu 13.10"
955
},
956
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/kubuntu-13.10-1-x86_64.diskdump",
957
"container_format": "bare",
958
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
959
"is_public": true,
960
"deleted_at": "",
961
"id": "5f0a7a25-6210-4e28-b6fa-c9978fb3f61d",
962
"size": 3425742848
963
},
964
{
965
"status": "available",
966
"name": "CELAR_Jenkins_snapshot_111213",
967
"checksum": "6d45dc96602288eb3551456fea8a7b56a6d70ae1345ece08c3db35f020cdc7e8",
968
"created_at": "2013-12-11 08:57:38",
969
"disk_format": "diskdump",
970
"updated_at": "2013-12-11 08:57:38",
971
"properties": {
972
"partition_table": "msdos",
973
"osfamily": "linux",
974
"description": "Ubuntu 12.04.2 LTS",
975
"os": "ubuntu",
976
"root_partition": "1",
977
"users": "user konstantin vangelis"
978
},
979
"location": "pithos://f782c65e-b9e7-47fc-8ed0-6cc11e7658e8/images/CELAR_Jenkins_snapshot_111213-201312111053.diskdump",
980
"container_format": "bare",
981
"owner": "f782c65e-b9e7-47fc-8ed0-6cc11e7658e8",
982
"is_public": true,
983
"deleted_at": "",
984
"id": "fa34e0a0-b474-464b-a563-9aea1bc3e9b5",
985
"size": 2463830016
986
},
987
{
988
"status": "available",
989
"name": "CELAR_Nexus_snapshot_111213",
990
"checksum": "13df1df1751af3c70c71be5caea0d7c0b29e80b2ada484e3231b3f6623995436",
991
"created_at": "2013-12-11 08:57:38",
992
"disk_format": "diskdump",
993
"updated_at": "2013-12-11 08:57:38",
994
"properties": {
995
"partition_table": "msdos",
996
"osfamily": "linux",
997
"description": "Ubuntu 12.04.3 LTS",
998
"os": "ubuntu",
999
"root_partition": "1",
1000
"users": "user konstantin vangelis"
1001
},
1002
"location": "pithos://f782c65e-b9e7-47fc-8ed0-6cc11e7658e8/images/CELAR_Nexus_snapshot_111213-201312111052.diskdump",
1003
"container_format": "bare",
1004
"owner": "f782c65e-b9e7-47fc-8ed0-6cc11e7658e8",
1005
"is_public": true,
1006
"deleted_at": "",
1007
"id": "8258fe3d-3b6d-49c7-88aa-bc28cc44d609",
1008
"size": 2709106688
1009
},
1010
{
1011
"status": "available",
1012
"name": "Ubuntu Desktop",
1013
"checksum": "36fbc5c30735ef5dfa7b03db6dd873c09597dcc4bd9051d76173a5d9ad7a679d",
1014
"created_at": "2013-12-10 11:29:35",
1015
"disk_format": "diskdump",
1016
"updated_at": "2013-12-10 11:29:35",
1017
"properties": {
1018
"partition_table": "msdos",
1019
"kernel": "3.11.0",
1020
"osfamily": "linux",
1021
"users": "user",
1022
"gui": "MATE Desktop Environment 1.6.0",
1023
"sortorder": "3",
1024
"os": "ubuntu",
1025
"root_partition": "1",
1026
"description": "Ubuntu 13.10 with MATE"
1027
},
1028
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/ubuntu_desktop-13.10-1-x86_64.diskdump",
1029
"container_format": "bare",
1030
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
1031
"is_public": true,
1032
"deleted_at": "",
1033
"id": "49beee24-17b5-4bb2-9de6-7cef3d92de42",
1034
"size": 3679756288
1035
},
1036
{
1037
"status": "available",
1038
"name": "Dartha ubuntu",
1039
"checksum": "be14316a5f867d763d00a7173dc9e3b2d295df7dd365061b3dbb8a2eaa5e1203",
1040
"created_at": "2013-12-10 09:15:06",
1041
"disk_format": "diskdump",
1042
"updated_at": "2013-12-10 09:15:06",
1043
"properties": {
1044
"partition_table": "msdos",
1045
"osfamily": "linux",
1046
"description": "Ubuntu 12.04.3 LTS no gui",
1047
"os": "ubuntu",
1048
"root_partition": "1",
1049
"users": "malf"
1050
},
1051
"location": "pithos://d098aa00-f56c-4cc0-8abe-7ed5b9a4bf2a/images/Dartha ubuntu-201312101103.diskdump",
1052
"container_format": "bare",
1053
"owner": "d098aa00-f56c-4cc0-8abe-7ed5b9a4bf2a",
1054
"is_public": true,
1055
"deleted_at": "",
1056
"id": "d0ae1af2-eac0-453e-bb2e-720b10a2e2d4",
1057
"size": 2346725376
1058
},
1059
{
1060
"status": "available",
1061
"name": "Dartha Ubuntu",
1062
"checksum": "0f436378ba7c0c5700b0133fb4eb6d0181a33e4b696b44a019abb8f77cede553",
1063
"created_at": "2013-12-09 22:00:58",
1064
"disk_format": "diskdump",
1065
"updated_at": "2013-12-09 22:00:58",
1066
"properties": {
1067
"partition_table": "msdos",
1068
"osfamily": "linux",
1069
"description": "Ubuntu 12.04.3 Base install no Gui",
1070
"os": "ubuntu",
1071
"root_partition": "1",
1072
"users": "malf"
1073
},
1074
"location": "pithos://d098aa00-f56c-4cc0-8abe-7ed5b9a4bf2a/images/Dartha Ubuntu-201312092103.diskdump",
1075
"container_format": "bare",
1076
"owner": "d098aa00-f56c-4cc0-8abe-7ed5b9a4bf2a",
1077
"is_public": true,
1078
"deleted_at": "",
1079
"id": "83c4c2d5-50b4-4400-b95d-3d10a760e8d6",
1080
"size": 1128448000
1081
},
1082
{
1083
"status": "available",
1084
"name": "archie-2013.12.01",
1085
"checksum": "3436cf7b39d6843969c2049520fad40a984afaa3584eb89baddb7e4c074cfffe",
1086
"created_at": "2013-12-02 21:21:51",
1087
"disk_format": "diskdump",
1088
"updated_at": "2013-12-02 21:21:51",
1089
"properties": {
1090
"partition_table": "gpt",
1091
"osfamily": "linux",
1092
"description": "ArchLinux 2013.12.01 w/ openssh,vim and iptables setup - Only PubKeyAuth accepted",
1093
"os": "archlinux",
1094
"root_partition": "2",
1095
"users": "root"
1096
},
1097
"location": "pithos://7e271a0b-1427-45ec-9916-f8e72bfbf3d4/images/archie-2013.12.01-201312022313.diskdump",
1098
"container_format": "bare",
1099
"owner": "7e271a0b-1427-45ec-9916-f8e72bfbf3d4",
1100
"is_public": true,
1101
"deleted_at": "",
1102
"id": "8fea4394-78fe-409d-a560-0cd517986c6f",
1103
"size": 648056832
1104
},
1105
{
1106
"status": "available",
1107
"name": "arch",
1108
"checksum": "c10e2fdf8acc6239bd07350897207218285b7348b8e1931a9ca161df06b700c3",
1109
"created_at": "2013-11-12 18:51:06",
1110
"disk_format": "diskdump",
1111
"updated_at": "2013-11-12 18:51:06",
1112
"properties": {
1113
"partition_table": "gpt",
1114
"osfamily": "linux",
1115
"description": "unknown",
1116
"os": "archlinux",
1117
"root_partition": "1",
1118
"users": "root"
1119
},
1120
"location": "pithos://00759b1d-a20e-439a-99ad-f11a91ba68e6/images/arch-201311122011.diskdump",
1121
"container_format": "bare",
1122
"owner": "00759b1d-a20e-439a-99ad-f11a91ba68e6",
1123
"is_public": true,
1124
"deleted_at": "",
1125
"id": "4a65772b-98fd-43b3-b3b9-cd083849e63b",
1126
"size": 752332800
1127
},
1128
{
1129
"status": "available",
1130
"name": "ckan_2_1-debian_7_1",
1131
"checksum": "868fe3e7a016ec7d366bd15ecb33ea19b1160732ac05b7350e47a43ee133fb56",
1132
"created_at": "2013-11-08 07:32:49",
1133
"disk_format": "diskdump",
1134
"updated_at": "2013-11-08 07:32:49",
1135
"properties": {
1136
"partition_table": "msdos",
1137
"osfamily": "linux",
1138
"description": "CKAN 2.1 base installation on a debian 7.1 system",
1139
"os": "debian",
1140
"root_partition": "1",
1141
"users": "root ckaner"
1142
},
1143
"location": "pithos://66a0f15a-69ce-4a18-8177-2343da55c2e1/images/ckan_2_1-debian_7_1-201311080928.diskdump",
1144
"container_format": "bare",
1145
"owner": "66a0f15a-69ce-4a18-8177-2343da55c2e1",
1146
"is_public": true,
1147
"deleted_at": "",
1148
"id": "0e399015-8723-4c78-8198-75bdf693cdde",
1149
"size": 1995177984
1150
},
1151
{
1152
"status": "available",
1153
"name": "OPENBSD54",
1154
"checksum": "5215920e1393f47d6fa10444695a49061b037e831c4cafae82c3839e9453030b",
1155
"created_at": "2013-11-04 18:33:51",
1156
"disk_format": "diskdump",
1157
"updated_at": "2013-11-04 18:33:51",
1158
"properties": {
1159
"exclude_all_tasks": "true"
1160
},
1161
"location": "pithos://f1380d5a-7d53-427a-a255-5fdd50c8c983/images/openbsd54.diskdump",
1162
"container_format": "bare",
1163
"owner": "f1380d5a-7d53-427a-a255-5fdd50c8c983",
1164
"is_public": true,
1165
"deleted_at": "",
1166
"id": "493e78e9-f469-4a71-abea-4d50db71f535",
1167
"size": 2147483648
1168
},
1169
{
1170
"status": "available",
1171
"name": "Gitlab ubuntu 12.04",
1172
"checksum": "93d0832a479dee3b8f8e0ac042cfcc93bc462399b012726b5bf9aa05abd855bc",
1173
"created_at": "2013-10-31 23:37:16",
1174
"disk_format": "diskdump",
1175
"updated_at": "2013-10-31 23:37:16",
1176
"properties": {
1177
"partition_table": "msdos",
1178
"osfamily": "linux",
1179
"users": "user",
1180
"exclude_task_deletesshkeys": "yes",
1181
"exclude_task_assignhostname": "yes",
1182
"os": "ubuntu",
1183
"root_partition": "1",
1184
"description": "Ubuntu 12.04.2 LTS"
1185
},
1186
"location": "pithos://23f92921-cef9-4aca-b74d-448628380949/images/ubuntu_gitlab.diskdump",
1187
"container_format": "bare",
1188
"owner": "23f92921-cef9-4aca-b74d-448628380949",
1189
"is_public": true,
1190
"deleted_at": "",
1191
"id": "23f7c7ad-544c-46db-8626-e9f82050cee5",
1192
"size": 35648634880
1193
},
1194
{
1195
"status": "available",
1196
"name": "openBSD53",
1197
"checksum": "21c98906032b763550098a9b07411d684f0c7772aacb2581a8f6514590090461",
1198
"created_at": "2013-10-29 16:29:36",
1199
"disk_format": "diskdump",
1200
"updated_at": "2013-10-29 16:29:36",
1201
"properties": {
1202
"osfamily": "freebsd",
1203
"exclude_all_tasks": "yes",
1204
"root_partition": "1"
1205
},
1206
"location": "pithos://f1380d5a-7d53-427a-a255-5fdd50c8c983/images/openBSD53.diskdump",
1207
"container_format": "bare",
1208
"owner": "f1380d5a-7d53-427a-a255-5fdd50c8c983",
1209
"is_public": true,
1210
"deleted_at": "",
1211
"id": "b26866dd-4626-4c12-85e3-9435048dd8a7",
1212
"size": 2147483648
1213
},
1214
{
1215
"status": "available",
1216
"name": "openBSD5",
1217
"checksum": "123223fc64c98657c28205e660cfb814ad6c44c15d7692029b9afd6ebea0920b",
1218
"created_at": "2013-10-27 22:36:49",
1219
"disk_format": "diskdump",
1220
"updated_at": "2013-10-27 22:36:49",
1221
"properties": {
1222
"osfamily": "freebsd",
1223
"root_partition": "1"
1224
},
1225
"location": "pithos://f1380d5a-7d53-427a-a255-5fdd50c8c983/images/openBSD51.diskdump",
1226
"container_format": "bare",
1227
"owner": "f1380d5a-7d53-427a-a255-5fdd50c8c983",
1228
"is_public": true,
1229
"deleted_at": "",
1230
"id": "8ff7d98a-9beb-46d2-8977-39b29443a7b2",
1231
"size": 2147483648
1232
},
1233
{
1234
"status": "available",
1235
"name": "Ubuntu orchestrator",
1236
"checksum": "a99ecd32f79e28d723f4d73a2594406e6002c74ff3ae512de6feb06135b811a8",
1237
"created_at": "2013-10-24 14:35:10",
1238
"disk_format": "diskdump",
1239
"updated_at": "2013-10-24 14:35:10",
1240
"properties": {
1241
"partition_table": "msdos",
1242
"osfamily": "linux",
1243
"users": "root",
1244
"exclude_task_deletesshkeys": "yes",
1245
"os": "ubuntu",
1246
"root_partition": "1",
1247
"description": "Ubuntu 13.04"
1248
},
1249
"location": "pithos://d4a583cb-444e-4bb7-a588-fa1134c23efc/images/ubuntu.diskdump",
1250
"container_format": "bare",
1251
"owner": "d4a583cb-444e-4bb7-a588-fa1134c23efc",
1252
"is_public": true,
1253
"deleted_at": "",
1254
"id": "01a4b2f1-2acd-4031-8801-3d94ebe3f4d4",
1255
"size": 4012126208
1256
},
1257
{
1258
"status": "available",
1259
"name": "scientificlinux",
1260
"checksum": "1d6a6568aa3ae0ae685096a716c0ad5b98bb00e6cc635a339f00f9d332ca76ef",
1261
"created_at": "2013-10-11 15:55:20",
1262
"disk_format": "diskdump",
1263
"updated_at": "2013-10-11 15:55:20",
1264
"properties": {
1265
"partition_table": "msdos",
1266
"osfamily": "linux",
1267
"description": "Scientific Linux SL release 5.5 (Boron)",
1268
"os": "scientificlinux",
1269
"root_partition": "1",
1270
"users": "root"
1271
},
1272
"location": "pithos://82a704cd-8874-4302-ae16-7c7221bdfb57/images/scientificlinux-201310111828.diskdump",
1273
"container_format": "bare",
1274
"owner": "82a704cd-8874-4302-ae16-7c7221bdfb57",
1275
"is_public": true,
1276
"deleted_at": "",
1277
"id": "e9ec7d24-96a1-412d-8e05-569bac5744a4",
1278
"size": 3278614016
1279
},
1280
{
1281
"status": "available",
1282
"name": "Ubuntu-server-13.04",
1283
"checksum": "0bb01480c0db44a473b79dd3e4fb4f66a02de87d572e1cf083d193afeaf3f601",
1284
"created_at": "2013-10-06 02:31:19",
1285
"disk_format": "diskdump",
1286
"updated_at": "2013-10-06 02:31:19",
1287
"properties": {
1288
"partition_table": "msdos",
1289
"osfamily": "linux",
1290
"description": "Ubuntu server 13.04",
1291
"os": "ubuntu",
1292
"root_partition": "1",
1293
"users": "user"
1294
},
1295
"location": "pithos://9ac455ec-21aa-427d-8c11-2b34faa8e006/images/Ubuntu-server-13.04-201310051444.diskdump",
1296
"container_format": "bare",
1297
"owner": "9ac455ec-21aa-427d-8c11-2b34faa8e006",
1298
"is_public": true,
1299
"deleted_at": "",
1300
"id": "545d36df-53da-46bd-86ed-759ac3eb1995",
1301
"size": 1303494656
1302
},
1303
{
1304
"status": "available",
1305
"name": "ubuntu server 12.04 + asterisk voip server",
1306
"checksum": "4d2fe46b7cd068d520773268cf25f78fdc85bfbe3c2f521d4b78b577fee7f087",
1307
"created_at": "2013-10-05 22:19:00",
1308
"disk_format": "diskdump",
1309
"updated_at": "2013-10-05 22:19:00",
1310
"properties": {
1311
"partition_table": "msdos",
1312
"osfamily": "linux",
1313
"description": "Ubuntu 12.04.3 LTS",
1314
"os": "ubuntu",
1315
"root_partition": "1",
1316
"users": "user"
1317
},
1318
"location": "pithos://c3eb14d6-ed97-4b00-8b68-7ccecad73f37/images/ubuntu server 12.04 + asterisk voip server-201310060104.diskdump",
1319
"container_format": "bare",
1320
"owner": "c3eb14d6-ed97-4b00-8b68-7ccecad73f37",
1321
"is_public": true,
1322
"deleted_at": "",
1323
"id": "0f12a5e0-5369-4bed-abd6-5b03d87cc5da",
1324
"size": 1805869056
1325
},
1326
{
1327
"status": "available",
1328
"name": "archlinux",
1329
"checksum": "58a69c601898ded320cce72d84f8dbe651e33fc5ea7435bd6c03da4798e92ec8",
1330
"created_at": "2013-10-03 06:56:14",
1331
"disk_format": "diskdump",
1332
"updated_at": "2013-10-03 06:56:14",
1333
"properties": {
1334
"partition_table": "gpt",
1335
"osfamily": "linux",
1336
"users": "root",
1337
"gui": "none",
1338
"filesystem": "ext4",
1339
"os": "archlinux",
1340
"root_partition": "2",
1341
"description": "03/10/2013"
1342
},
1343
"location": "pithos://309cf993-79be-4aed-b335-9f98ff79800d/images/archlinux.diskdump",
1344
"container_format": "bare",
1345
"owner": "309cf993-79be-4aed-b335-9f98ff79800d",
1346
"is_public": true,
1347
"deleted_at": "",
1348
"id": "c9f3980d-6a82-4121-b24e-d7b5f29a4a00",
1349
"size": 876949504
1350
},
1351
{
1352
"status": "available",
1353
"name": "Kubuntu LTS",
1354
"checksum": "1bf3e14d72bfb340a83e54ccfd7137ee0af7092c6d5dbfcc99432b4cb892f0d3",
1355
"created_at": "2013-09-28 07:35:45",
1356
"disk_format": "diskdump",
1357
"updated_at": "2013-09-28 07:35:45",
1358
"properties": {
1359
"partition_table": "msdos",
1360
"kernel": "3.2.0",
1361
"osfamily": "linux",
1362
"users": "user",
1363
"gui": "KDE 4.8.2",
1364
"sortorder": "4",
1365
"os": "kubuntu",
1366
"root_partition": "1",
1367
"description": "Kubuntu 12.04.3 LTS"
1368
},
1369
"location": "pithos://25ecced9-bf53-4145-91ee-cf47377e9fb2/images/kubuntu-12.04-5-x86_64.diskdump",
1370
"container_format": "bare",
1371
"owner": "25ecced9-bf53-4145-91ee-cf47377e9fb2",
1372
"is_public": true,
1373
"deleted_at": "",
1374
"id": "e755d33c-92fc-4042-922e-ca03d8b3ecbd",
1375
"size": 2707611648
1376
},
1377
{
1378
"status": "available",
1379
"name": "snf-test-db590326-0df1-464d-844f-a246d7ccac91.diskdump",
1380
"checksum": "54dc540edb181326f5231195a859b07df0fd35736f245910d95fa34d73fd6b18",
1381
"created_at": "2013-09-25 06:22:22",
1382
"disk_format": "diskdump",
1383
"updated_at": "2013-09-25 06:22:22",
1384
"properties": {
1385
"osfamily": "linux",
1386
"root_partition": "1"
1387
},
1388
"location": "pithos://c996c4e2-28dc-4d8a-a8e7-bfc6830cb1f6/images/snf-test-db590326-0df1-464d-844f-a246d7ccac91.diskdump",
1389
"container_format": "bare",
1390
"owner": "c996c4e2-28dc-4d8a-a8e7-bfc6830cb1f6",
1391
"is_public": true,
1392
"deleted_at": "",
1393
"id": "6d8996b6-d4d3-4a47-9b90-fa858a87a2c3",
1394
"size": 550367232
1395
},
1396
{
1397
"status": "available",
1398
"name": "egi-accounting-portal",
1399
"checksum": "01501439f30196b78d136e2951831d1887c3253c68997ffb89e80bd64861a553",
1400
"created_at": "2013-09-13 10:50:17",
1401
"disk_format": "diskdump",
1402
"updated_at": "2013-09-13 10:50:17",
1403
"properties": {
1404
"partition_table": "msdos",
1405
"osfamily": "linux",
1406
"description": "Scientific Linux release 6.3 (Carbon)",
1407
"os": "scientificlinux",
1408
"root_partition": "1",
1409
"users": "root idiaz"
1410
},
1411
"location": "pithos://a3ff8143-4586-4910-aeb3-6e68f3d32c13/images/egi-accounting-portal.raw",
1412
"container_format": "bare",
1413
"owner": "a3ff8143-4586-4910-aeb3-6e68f3d32c13",
1414
"is_public": true,
1415
"deleted_at": "",
1416
"id": "15feb8ee-98b1-4a9f-b048-1f5b287d8bcc",
1417
"size": 45097156608
1418
},
1419
{
1420
"status": "available",
1421
"name": "ubuntu",
1422
"checksum": "3544e9198b4bec7b9a12f7729dd88faf38c0bff4aae50637c3322f688ff9ef7e",
1423
"created_at": "2013-08-21 10:04:30",
1424
"disk_format": "diskdump",
1425
"updated_at": "2013-08-21 10:04:30",
1426
"properties": {
1427
"partition_table": "msdos",
1428
"osfamily": "linux",
1429
"description": "Ubuntu 12.04.2 LTS",
1430
"os": "debian",
1431
"root_partition": "1",
1432
"users": "root"
1433
},
1434
"location": "pithos://ae458ae3-b92e-479f-8aa4-8c3e257c902a/images/ubuntu-201308211302.diskdump",
1435
"container_format": "bare",
1436
"owner": "ae458ae3-b92e-479f-8aa4-8c3e257c902a",
1437
"is_public": false,
1438
"deleted_at": "",
1439
"id": "ae09428c-e99a-477a-b703-224bbd7e7cb6",
1440
"size": 781930496
1441
},
1442
{
1443
"status": "available",
1444
"name": "BackTrack 5 R3",
1445
"checksum": "72dac278887c0411dfbc5c772a695a6ee6f3c88843c3df1673128dc83e309144",
1446
"created_at": "2013-08-05 01:33:25",
1447
"disk_format": "diskdump",
1448
"updated_at": "2013-08-05 01:33:25",
1449
"properties": {
1450
"partition_table": "msdos",
1451
"osfamily": "linux",
1452
"users": "root",
1453
"swap": "5:605",
1454
"os": "ubuntu",
1455
"root_partition": "1",
1456
"description": "Backtrack 5 R3 Gnome i386"
1457
},
1458
"location": "pithos://ddbaf544-9874-4007-833e-0547bd8c6bf1/images/BackTrack 5 R3-201308050412.diskdump",
1459
"container_format": "bare",
1460
"owner": "ddbaf544-9874-4007-833e-0547bd8c6bf1",
1461
"is_public": true,
1462
"deleted_at": "",
1463
"id": "9f82e379-b111-4f72-8fbf-4fb37aa5ccc9",
1464
"size": 11485241344
1465
},
1466
{
1467
"status": "available",
1468
"name": "Advcomparch@CSLab 2012-2013",
1469
"checksum": "8d9b9ebaefd3add69de8d834ff90957472f2df72ca4b013130fb0083ca0e7bdf",
1470
"created_at": "2013-04-23 12:39:31",
1471
"disk_format": "diskdump",
1472
"updated_at": "2013-04-23 12:39:31",
1473
"properties": {
1474
"partition_table": "msdos",
1475
"osfamily": "linux",
1476
"description": "Ubuntu 12.10",
1477
"os": "ubuntu",
1478
"root_partition": "1",
1479
"users": "user"
1480
},
1481
"location": "pithos://a504f156-7660-4793-a23f-ea0bbee748e9/images/advcomparch_cslab_ubuntu.diskdump",
1482
"container_format": "bare",
1483
"owner": "a504f156-7660-4793-a23f-ea0bbee748e9",
1484
"is_public": true,
1485
"deleted_at": "",
1486
"id": "505dcadb-d978-4f2b-ba68-02fc69fb50a8",
1487
"size": 5673857024
1488
},
1489
{
1490
"status": "available",
1491
"name": "ubuntu",
1492
"checksum": "958a674f7f97a9e7456ec6b4db41e125c9c8c2213f5192ba442ad88524517097",
1493
"created_at": "2013-04-23 09:58:27",
1494
"disk_format": "diskdump",
1495
"updated_at": "2013-04-23 09:58:27",
1496
"properties": {
1497
"partition_table": "msdos",
1498
"osfamily": "linux",
1499
"description": "Ubuntu 12.10",
1500
"os": "ubuntu",
1501
"root_partition": "1",
1502
"users": "user"
1503
},
1504
"location": "pithos://607bc20e-ae01-46ca-8a7d-d37b92e9908f/images/ubuntu-201304231229.diskdump",
1505
"container_format": "bare",
1506
"owner": "607bc20e-ae01-46ca-8a7d-d37b92e9908f",
1507
"is_public": true,
1508
"deleted_at": "",
1509
"id": "90554939-41c9-42e6-b654-1e167743c950",
1510
"size": 11523715072
1511
},
1512
{
1513
"status": "available",
1514
"name": "Kali Linux (former BackTrack)",
1515
"checksum": "e1fdc270c55f72f781e8ebba13820a5e2d8e02c8f3ef1d77faac8ec4be657b65",
1516
"created_at": "2013-04-13 09:32:02",
1517
"disk_format": "diskdump",
1518
"updated_at": "2013-04-13 09:32:02",
1519
"properties": {
1520
"partition_table": "msdos",
1521
"osfamily": "linux",
1522
"users": "root",
1523
"swap": "5:466",
1524
"os": "debian",
1525
"root_partition": "1",
1526
"description": "Kali Linux 1.0 - Former BackTrack5R3 (with update option)"
1527
},
1528
"location": "pithos://472ca914-0a88-4bc8-ab5e-72d49e5d51eb/images/Kali Linux (former BackTrack)-201304131215.diskdump",
1529
"container_format": "bare",
1530
"owner": "472ca914-0a88-4bc8-ab5e-72d49e5d51eb",
1531
"is_public": true,
1532
"deleted_at": "",
1533
"id": "c9e811fa-39a9-4d13-8a6f-9102105801cb",
1534
"size": 7766769664
1535
},
1536
{
1537
"status": "available",
1538
"name": "BackTrack5R3",
1539
"checksum": "6ca2c0f28026c5a73d355b878281e54f475c8da2edb09b072e7d218a4ba84d4a",
1540
"created_at": "2013-04-11 22:59:24",
1541
"disk_format": "diskdump",
1542
"updated_at": "2013-04-11 22:59:24",
1543
"properties": {
1544
"partition_table": "msdos",
1545
"osfamily": "linux",
1546
"users": "root",
1547
"swap": "5:564",
1548
"os": "ubuntu",
1549
"root_partition": "1",
1550
"description": "BackTrack5R3 w/ SSH & Correct Locale"
1551
},
1552
"location": "pithos://472ca914-0a88-4bc8-ab5e-72d49e5d51eb/images/BackTrack5R3-201304120130.diskdump",
1553
"container_format": "bare",
1554
"owner": "472ca914-0a88-4bc8-ab5e-72d49e5d51eb",
1555
"is_public": true,
1556
"deleted_at": "",
1557
"id": "e5a74e94-890b-44cc-8951-0786eeef7140",
1558
"size": 11783667712
1559
},
1560
{
1561
"status": "available",
1562
"name": "Kali-Linux-Gnome-amd64",
1563
"checksum": "cd4aa49026f4fb791442243e1429239c7e5a0027d83aecf380c41b8fee7bd804",
1564
"created_at": "2013-04-09 14:04:33",
1565
"disk_format": "diskdump",
1566
"updated_at": "2013-04-09 14:04:33",
1567
"properties": {
1568
"partition_table": "msdos",
1569
"osfamily": "linux",
1570
"users": "root",
1571
"swap": "5:466",
1572
"os": "debian",
1573
"root_partition": "1",
1574
"description": "Kali Linux 1.0.2 Gnome 64"
1575
},
1576
"location": "pithos://e472fd72-4ec8-428f-a9f1-8ce9f768de09/images/Kali-Linux-Gnome-amd64-201304091627.diskdump",
1577
"container_format": "bare",
1578
"owner": "e472fd72-4ec8-428f-a9f1-8ce9f768de09",
1579
"is_public": true,
1580
"deleted_at": "",
1581
"id": "6f88c581-1e30-4ad6-8de9-330d03fad0a8",
1582
"size": 7716986880
1583
},
1584
{
1585
"status": "available",
1586
"name": "PANDORA Ubuntu 12.04",
1587
"checksum": "6699cf250d4b920005fa26f98240d98b30d9d3eb50d51d12ebf59092b223149f",
1588
"created_at": "2013-03-21 19:32:01",
1589
"disk_format": "diskdump",
1590
"updated_at": "2013-03-21 19:32:01",
1591
"properties": {
1592
"partition_table": "msdos",
1593
"osfamily": "linux",
1594
"description": "Ubuntu 12.04.2 LTS",
1595
"os": "ubuntu",
1596
"root_partition": "1",
1597
"users": "user"
1598
},
1599
"location": "pithos://23f92921-cef9-4aca-b74d-448628380949/images/pandora_ubuntu_12_04.diskdump",
1600
"container_format": "bare",
1601
"owner": "23f92921-cef9-4aca-b74d-448628380949",
1602
"is_public": true,
1603
"deleted_at": "",
1604
"id": "aaafe1de-edfe-4f29-8c3f-50707ccd7d0a",
1605
"size": 5000081408
1606
},
1607
{
1608
"status": "available",
1609
"name": "Ubuntu-10.04",
1610
"checksum": "7e2f5a282a936b47d27e26c1a9926be8b7df41c072e72addecbe2c452582bd7f",
1611
"created_at": "2013-03-21 13:47:11",
1612
"disk_format": "diskdump",
1613
"updated_at": "2013-03-21 13:47:11",
1614
"properties": {
1615
"partition_table": "msdos",
1616
"osfamily": "linux",
1617
"description": "Ubuntu 10.04.4 LTS",
1618
"os": "ubuntu",
1619
"root_partition": "1",
1620
"users": "nemo"
1621
},
1622
"location": "pithos://8ce17bf9-5b1d-425a-adb0-d415e29df1d3/images/Ubuntu-10.04.4.diskdump",
1623
"container_format": "bare",
1624
"owner": "8ce17bf9-5b1d-425a-adb0-d415e29df1d3",
1625
"is_public": true,
1626
"deleted_at": "",
1627
"id": "917ee618-c03a-4473-9024-9448e12890c1",
1628
"size": 761368576
1629
},
1630
{
1631
"status": "available",
1632
"name": "ubuntu",
1633
"checksum": "e277e73ac70e94f951ac31b9fc859ced696234d2fd91b887d83daf822d7e9a88",
1634
"created_at": "2013-03-19 15:56:47",
1635
"disk_format": "diskdump",
1636
"updated_at": "2013-03-19 15:56:47",
1637
"properties": {
1638
"partition_table": "msdos",
1639
"osfamily": "linux",
1640
"description": "Ubuntu 12.04.2 LTS",
1641
"os": "ubuntu",
1642
"root_partition": "1",
1643
"users": "user"
1644
},
1645
"location": "pithos://ae458ae3-b92e-479f-8aa4-8c3e257c902a/images/ubuntu-201303191752.diskdump",
1646
"container_format": "bare",
1647
"owner": "ae458ae3-b92e-479f-8aa4-8c3e257c902a",
1648
"is_public": true,
1649
"deleted_at": "",
1650
"id": "5583fed1-5273-4c64-9e32-3fbe476bd7b7",
1651
"size": 2622562304
1652
},
1653
{
1654
"status": "available",
1655
"name": "Archlinux",
1656
"checksum": "1a126aad07475b43300448b0b26478391094bc07bcc1959b446344211be13974",
1657
"created_at": "2013-01-28 22:44:55",
1658
"disk_format": "diskdump",
1659
"updated_at": "2013-01-28 22:44:55",
1660
"properties": {
1661
"partition_table": "msdos",
1662
"osfamily": "linux",
1663
"users": "root",
1664
"exclude_task_assignhostname": "yes",
1665
"os": "archlinux",
1666
"root_partition": "1",
1667
"description": "Archlinux base install 2012.12.01"
1668
},
1669
"location": "pithos://fac4a96c-1fed-4f93-92f6-5b4b268f9351/images/archlinux.12.2012",
1670
"container_format": "bare",
1671
"owner": "fac4a96c-1fed-4f93-92f6-5b4b268f9351",
1672
"is_public": true,
1673
"deleted_at": "",
1674
"id": "b4713f20-3a41-4eaf-81ae-88698c18b3e8",
1675
"size": 752782848
1676
},
1677
{
1678
"status": "available",
1679
"name": "ubuntu",
1680
"checksum": "f3703675b311604a9d37f88a0de4a9bc5550a1e65f8f6b1d01605604868accf2",
1681
"created_at": "2013-01-23 16:15:22",
1682
"disk_format": "diskdump",
1683
"updated_at": "2013-01-23 16:15:22",
1684
"properties": {
1685
"partition_table": "msdos",
1686
"osfamily": "linux",
1687
"description": "Ubuntu 12.04.1 LTS",
1688
"os": "ubuntu",
1689
"root_partition": "1",
1690
"users": "user"
1691
},
1692
"location": "pithos://ae458ae3-b92e-479f-8aa4-8c3e257c902a/images/ubuntu-201301231811.diskdump",
1693
"container_format": "bare",
1694
"owner": "ae458ae3-b92e-479f-8aa4-8c3e257c902a",
1695
"is_public": true,
1696
"deleted_at": "",
1697
"id": "5ed5a29b-292c-4fe0-b32c-2e2b65628635",
1698
"size": 2578100224
1699
}
1700
]
1701

    
1702
;/* Mapping */
1703

    
1704
Synnefo.Router.map(function() {
1705
// I defined the above resource to extend its Route
1706
this.resource('sections', {'path':'/'});
1707
for(var i=0; i<Synnefo.conf.sectors.length; i++)
1708
        this.resource(Synnefo.conf.sectors[i].destination, function() {
1709
                // this.route('grid');
1710
                // this.route('list');
1711
                this.route('create');
1712
        });
1713
});
1714

    
1715

    
1716
/* Routes */
1717

    
1718
Synnefo.ApplicationRoute = Ember.Route.extend({
1719
        model: function() {
1720
                return this.store.find('account', 1);
1721
        },
1722
        redirect: function() {
1723
                //  have to set vm navigation icon full
1724
                this.transitionTo('vms');
1725
        },
1726
});
1727

    
1728

    
1729
/* Items Routes */
1730

    
1731
Synnefo.SectionsRoute = Ember.Route.extend({
1732
        modelName: undefined,
1733
        model: function() {
1734
                return this.store.find(this.modelName);
1735
        },
1736
        renderTemplate: function(controller) {
1737
                this.render('snfElems', {controller: controller});
1738
        },
1739
        actions: {
1740
                openWizard: function() {
1741
                        var wizardType = this.routeName;
1742
                        this.transitionTo(wizardType+'.create')
1743
                }
1744
        }
1745
});
1746

    
1747

    
1748
Synnefo.VmsRoute = Synnefo.SectionsRoute.extend({
1749
        modelName: 'vm'
1750
});
1751

    
1752
Synnefo.NetworksRoute = Synnefo.SectionsRoute.extend({
1753
        modelName: 'network'
1754
});
1755

    
1756
Synnefo.VolumesRoute = Synnefo.SectionsRoute.extend({
1757
        modelName: 'volume'
1758
});
1759

    
1760
Synnefo.SnapshotsRoute = Synnefo.SectionsRoute.extend({
1761
        modelName: 'snapshot'
1762
});
1763

    
1764
Synnefo.ImagesRoute = Synnefo.SectionsRoute.extend({
1765
        modelName: 'userImage'
1766
});
1767

    
1768

    
1769
/* Wizards Routes */
1770

    
1771
Synnefo.CreateRoute = Ember.Route.extend({
1772

    
1773
        renderTemplate: function(controller) {
1774
                this.render('wizard', {controller: controller}); // template
1775
        },
1776

    
1777
        /*        beforeModel: function() {
1778
                this._super();
1779
                console.log('beforeModel ',this.get('router.url'))
1780
                this.previousRoute = this.get('router.url'); // should return the current path but some times it returns the path where the user was before (when i dont type the url of the wizard)
1781
        },
1782
        previousRoute: undefined,*/
1783

    
1784
        setupController: function(controller) {
1785
                controller.set('image', this.store.find('image'));
1786
                controller.set('account', this.store.find('account', 1));
1787
        },
1788
        actions: {
1789
                closeWizard: function() {
1790
                        history.back();
1791
                }
1792
        }
1793
});
1794

    
1795
Synnefo.VmsCreateRoute = Synnefo.CreateRoute.extend({
1796

    
1797
});
1798

    
1799
Synnefo.NetworksCreateRoute = Synnefo.CreateRoute.extend();
1800

    
1801
Synnefo.VolumesCreateRoute = Synnefo.CreateRoute.extend();
1802

    
1803
Synnefo.SnapshotsCreateRoute = Synnefo.CreateRoute.extend();
1804

    
1805
Synnefo.ImagesCreateRoute = Synnefo.CreateRoute.extend({});;/* Controllers */
1806

    
1807
Synnefo.ApplicationController = Ember.Controller.extend({
1808
        updateCurrentPath: function() {
1809
                // we need the set because ElemsController gets the value of current path in every transition
1810
                Synnefo.set('currentPath', this.get('currentPath'))
1811
                return this.get('currentPath');
1812
        }.observes('currentPath'),
1813

    
1814
        pageTitle : function() {
1815
                var currentPath =this.get('currentPath');
1816
                if(currentPath!== 'index') return Synnefo.conf.sectors.findBy('destination', this.get('currentPath')).title;
1817
                        else return 'Home';
1818
        }.property('currentPath'),
1819

    
1820
        // name: "okeanos application",
1821
});
1822

    
1823

    
1824
/* Items Controllers */
1825

    
1826
Synnefo.ElemsController = Ember.ArrayController.extend({
1827
        type: undefined,
1828
        itemController: function(){
1829
                var type = this.type;
1830
                return type.substring(0, type.length - 1);
1831
        }.property(),
1832
        icon: function() {
1833
                // should this be placed in ElemsView?
1834
                return        Synnefo.conf.sectors.findBy('destination', this.get('type')).icon.replace('outline', 'full');
1835
        }.property(),
1836
        hasOS: function(){
1837
                        if(Synnefo.get('currentPath') === "vms" || Synnefo.get('currentPath') === "vms.index")
1838
                                return true;
1839
                        else return false;
1840
        }.property(),
1841
                hasTags: function(){
1842
                        if(Synnefo.get('currentPath') == "vms" || Synnefo.get('currentPath') === "vms.index")
1843
                                return true;
1844
                        else return false;
1845
        }.property(),
1846
});
1847

    
1848
Synnefo.VmsController = Synnefo.ElemsController.extend({
1849
        type: 'vms'
1850
});
1851

    
1852

    
1853
Synnefo.NetworksController = Synnefo.ElemsController.extend({
1854
        type: 'networks'
1855
});
1856

    
1857
Synnefo.VolumesController = Synnefo.ElemsController.extend({
1858
        type: 'volumes'
1859
});
1860

    
1861

    
1862
Synnefo.SnapshotsController = Synnefo.ElemsController.extend({
1863
        type: 'snapshots'
1864
});
1865

    
1866
Synnefo.ImagesController = Synnefo.ElemsController.extend({
1867
        type: 'images'
1868
});
1869

    
1870

    
1871
/* Controllers for each Item */
1872

    
1873
Synnefo.ElemController = Ember.ObjectController.extend({
1874
        needs: [],
1875
        actionsList: Synnefo.conf.userActions,
1876
        setAvailableActions: function() {
1877
                var parent = this.needs;
1878
                var self = this;
1879
                return this.actionsList.filter(function(el) {
1880
                        return _.contains(el['snf-components'], self.get('controllers.'+parent).type) &&( _.contains(el['enabled-status'], self.get('model.status')) || _.contains(el['enabled-status'], 'all'));
1881
                })
1882
        }.property(),
1883
        createBtn: false,        
1884
        actions: {
1885
                shutdown: function(param) {
1886
                        this.set('model.status', 'shutting');
1887
                },
1888
                destroyElement: function(param) {
1889
                        var element = this.get('model');
1890
                        element.deleteRecord();
1891
                        element.save();
1892
                }
1893
        }
1894
});
1895

    
1896
Synnefo.VmController = Synnefo.ElemController.extend({
1897
        needs: ['vms']
1898
});
1899

    
1900
Synnefo.NetworkController = Synnefo.ElemController.extend({
1901
        needs: ['networks']
1902
});
1903

    
1904
Synnefo.VolumeController = Synnefo.ElemController.extend({
1905
        needs: ['volumes']
1906
});
1907

    
1908
Synnefo.SnapshotController = Synnefo.ElemController.extend({
1909
        needs: ['snapshots']
1910
});
1911

    
1912
Synnefo.ImageController = Synnefo.ElemController.extend({
1913
        needs: ['images']
1914
});
1915

    
1916

    
1917
/* Controllers for Wizards */
1918

    
1919
Synnefo.CreateController = Ember.Controller.extend({
1920
        currentStep: 1,
1921
        totalSteps: function() {
1922
                return 4;//this.get('stepsContent').length;
1923
        }.property(),
1924

    
1925
        btnLeftLabel: function(){
1926
                return (this.get('currentStep') === 1)?'CANCEL':'PREVIOUS';
1927
        }.property('currentStep'),
1928

    
1929
        btnRightLabel: function(){
1930
                return (this.get('currentStep') === this.get('totalSteps'))?'CREATE':'NEXT';
1931
        }.property('currentStep'),
1932

    
1933
        onMove: false,
1934
        directionMove: undefined,
1935
        init: function() {
1936
                this._super();
1937
                this.set('currentStep', 1);
1938
                this.set('onMove', false);
1939
                this.set('directionMove', undefined);
1940
        },
1941
        actions: {
1942
                moveNext: function() {
1943
                        console.log('[CreateController moveNext]');
1944
                        if(!this.get('onMove')) {
1945
                                if(this.get('currentStep') === this.get('totalSteps'))
1946
                                        this.resetClose();
1947
                                else {
1948
                                        this.set('directionMove', 'next');
1949
                                        this.set('onMove', true);
1950
                                }
1951
                        }
1952
                },
1953
                moveBack: function() {
1954
                        console.log('[CreateController moveBack]');
1955
                        if(!this.get('onMove')) {
1956
                                if(this.get('currentStep') === 1)
1957
                                        this.resetClose();
1958
                                else {
1959
                                        this.set('directionMove', 'prev');
1960
                                        this.set('onMove', true);
1961
                                }
1962
                        }
1963
                },
1964
        },
1965
        resetClose: function() {
1966
                console.log('[CreateController resetClose]');
1967
                this.get('target').send('closeWizard');
1968
                this.init();
1969
        }
1970
});
1971

    
1972

    
1973
Synnefo.VmsCreateController = Synnefo.CreateController.extend();
1974

    
1975
Synnefo.WizardVmStep1Controller = Ember.Controller.extend();;
1976
/* Views */
1977

    
1978
Ember.View.reopen({
1979
    didInsertElement: function() {
1980
       this._super();
1981
       this.set('elIsInserted', true);
1982
    },
1983

    
1984
    willDestroyElement: function() {
1985
       this._super();
1986
       this.set('elIsInserted', false);
1987
    }
1988
});
1989

    
1990

    
1991
Synnefo.ApplicationView = Ember.View.extend({
1992
        classNames: ['content']
1993
});
1994

    
1995

    
1996
/* Navigation Menu */
1997

    
1998
Synnefo.NavIconView = Ember.View.extend({
1999
        tagName: 'span',
2000
        click: function() {
2001
                var parentEl = this.$().parent('a');
2002
                var currentEl = this.$().parents('li').siblings('li').find('a.current');
2003

    
2004
                ui.replaceClass(currentEl, 'full', 'outline', 'snf-');
2005
                ui.replaceClass(parentEl, 'outline', 'full', 'snf-');
2006
        }
2007

    
2008
});
2009

    
2010
Synnefo.NavigationView = Ember.CollectionView.extend({
2011
  tagName: "ul",
2012
  classNames: ['icons-nav'],
2013

    
2014
  content: Synnefo.conf.sectors,
2015
  itemViewClass: Ember.View.extend({
2016
    templateName: "navigationItem"
2017
  }),
2018
});
2019

    
2020

    
2021
/* Items Parts */
2022

    
2023
Synnefo.ElemView = Ember.View.extend({
2024
        // templateName: 'elem',
2025
        addNewBtn: false,
2026
        templateName: 'snfElem',
2027
        tagName: 'li',
2028
        selectable: true,
2029
        initSelect: 'unchecked',
2030
        classNameBindings: ['status'],
2031
        attributeBindings: ['data-status'],
2032
        'data-status': function() {
2033
                return this.status;
2034
        }.property(),
2035
        status: function() {
2036
                return this.get('controller.status');
2037
        }.property('controller.status')
2038
});
2039

    
2040
Synnefo.ImgWrapView = Ember.View.extend({
2041
        templateName: 'img-wrap',
2042
        classNames: ['img-wrap'],
2043
        icon: function() {
2044
                var parentView = this.get('parentView');
2045
                var addNewBtn = parentView.get('addNewBtn');
2046
                if(addNewBtn)
2047
                        return parentView.get('icon');
2048
                else
2049
                        return parentView.get('controller').get('parentController').get('icon');
2050
        }.property()
2051
});
2052

    
2053
Synnefo.LabelNameView = Ember.View.extend({
2054
        templateName: 'name',
2055
        tagName: 'h4',
2056
        name: function() {
2057
                // the name may be defined inside the parent view or in its model or controller
2058
                return this.get('parentView').get('controller').get('name');
2059
        }.property()
2060
});
2061

    
2062
// to be changed
2063
Synnefo.ImmediateActionView = Ember.View.extend({
2064
        templateName: 'actions',
2065
        classNames: ['actions']
2066
});
2067

    
2068

    
2069
/* Wizard */
2070

    
2071

    
2072
Synnefo.CollectionView = Ember.CollectionView.extend({
2073
        counter: 0
2074
});
2075

    
2076
// to use (extend) Synnefo.CollectionItemView must a counter to be set (initialized) in the parent view
2077
//  so when we want to use Synnefo.CollectionItemView, the collection that includes has extend Synnefo.CollectionView
2078
Synnefo.CollectionItemView = Ember.View.extend({
2079
        // classNameBindings: ['isCurrent:current::', 'isFirst:preselected', 'isPast:past::'],
2080
                index: undefined, // index>=1
2081
                isCurrent: false,
2082
                isFirst: false,
2083
                isPrev: false,
2084
                init: function() {
2085
                        this._super();
2086
                        var prevIndex = this.get('parentView').get('counter');
2087
                        var index = ++prevIndex;
2088
                        this.get('parentView').set('counter', index);
2089
                        this.set('index', index);
2090
                        if(index === 1) {
2091
                                this.set('isFirst', true);
2092
                        }
2093
                },
2094
                isCurrent: function() {
2095
                        return this.index === this.get('controller').get('currentStep');
2096
                }.property('controller.currentStep'),
2097
                isPast: function() {
2098
                        return this.index < this.get('controller').get('currentStep');
2099
                }.property('controller.currentStep'),
2100
                isNext: function() {
2101
                        return this.index === (this.get('controller').get('currentStep')+1)
2102
;                }.property('controller.currentStep'),
2103
                isPrev: function() {
2104
                                return this.index === (this.get('controller').get('currentStep')-1);
2105
                }.property('controller.currentStep')
2106
        });
2107

    
2108

    
2109
/*Synnefo.WizardImagesCollectionView = Synnefo.CollectionView.extend({
2110
        tagName: 'ul',
2111
        itemViewClass: Synnefo.WizardImageView,
2112
        content: function() {
2113
                console.log(this.get('controller'))
2114
                return [1,2,3]
2115
        }.property()
2116
});
2117

2118
Synnefo.WizardImageView = Synnefo.CollectionItemView.extend({
2119
        classNameBindings: ['isFirst:preselected::'],
2120
        templateName: 'test'
2121
})*/
2122

    
2123

    
2124
Synnefo.WizardStepView = Synnefo.CollectionItemView.extend({
2125
        classNames: ['step'],
2126
        classNameBindings: ['isFirst:current::', 'isFirst:preselected', 'isNext:next::', 'isPrev:prev::'],
2127
        templateName: function() {
2128
                return 'wizardSteps/step-'+this.get('index');
2129
        }.property(),
2130
});
2131

    
2132
/*Synnefo.WizardImagesStepView = Synnefo.WizardStepView.extend({
2133
        templateName: 'wizardSteps/step-1'
2134
});*/
2135

    
2136
Synnefo.WizardStepsView = Synnefo.CollectionView.extend({
2137
        classNames: 'middle',
2138
        content: Synnefo.wizards.vmWizard.get('stepsContent'),
2139
        itemViewClass: Synnefo.WizardStepView,
2140
        move: function() {
2141
                if(this.get('elIsInserted')) {
2142
                        var onMove = this.get('controller').get('onMove');
2143
                        if(onMove) {
2144
                                var el = this.$();
2145
                                var self = this;
2146
                                // I find the current step from the view's property
2147
                                // not from dom's class to be sure that there will be no sychronisation problem?
2148
                                var direction = this.get('controller').get('directionMove');
2149
                                var viewCurrent = this._childViews.findBy('isCurrent', true);
2150
                                var totalSteps = this.get('controller').get('totalSteps')
2151

    
2152
                                if(!(direction === 'next' && viewCurrent.get('index') === totalSteps) && !(direction === 'prev' && viewCurrent.get('index') === 1)) {
2153
                                        var elCurrent = el.find('.current');
2154
                                        var elSteps = el.find('.step');
2155
                                        var pos = (direction==='next')?(100):(-100);
2156
                                        var viewToDisplay;
2157
                                        var elToDisplay
2158

    
2159
                                        if(direction === 'next') {
2160
                                                viewToDisplay = this._childViews.findBy('isNext', true);
2161
                                                elToDisplay = el.find('.next');
2162
                                        }
2163
                                        else {
2164
                                                viewToDisplay = this._childViews.findBy('isPrev', true);
2165
                                                elToDisplay = el.find('.prev');
2166
                                        }
2167

    
2168
                                        $('body').css('overflow', 'hidden');
2169

    
2170
                                        elToDisplay.css({
2171
                                                left: pos.toString()+'%'
2172
                                        }).addClass('current');
2173

    
2174
                                        elToDisplay.css({
2175
                                                top: document.body.scrollTop + 'px'
2176
                                        });
2177

    
2178
                                        elSteps.animate({
2179
                                                marginLeft: (-pos).toString() + '%'
2180
                                        },{
2181
                                                complete: _.bind(function() {
2182
                                                        elCurrent.removeClass('current');
2183
                                                        window.scroll(0, 0);
2184
                                                        elToDisplay.css({
2185
                                                                left: '0',
2186
                                                                top: '0'
2187
                                                        });
2188
                                                        elSteps.css({
2189
                                                                marginLeft: '0'
2190
                                                        });
2191
                                                        $('body').css('overflow', 'visible');
2192

    
2193
                                                        viewCurrent.set('isCurrent', false);
2194
                                                        viewToDisplay.set('isCurrent', true);
2195
                                                        self.get('controller').set('currentStep',viewToDisplay.get('index'));
2196
                                                        this.get('controller').set('onMove', false);
2197
                                                }, this)
2198
                                        });
2199
                                }
2200
                        }
2201
                }
2202
        }.observes('controller.onMove'),
2203
        didInsertElement: function() {
2204
                this._super();
2205
                $('body').addClass('with-overlay');
2206
        },
2207
        willDestroyElement: function() {
2208
                this._super();
2209
                $('body').removeClass('with-overlay');
2210
        }
2211
});
2212

    
2213

    
2214

    
2215
Synnefo.WizardHeadersView = Synnefo.CollectionView.extend({
2216
        tagName: 'ul',
2217
        classNames:['nums'],
2218
        content: Synnefo.wizards.vmWizard.stepsHeadlines,
2219
        itemViewClass: Synnefo.CollectionItemView.extend({
2220
                classNameBindings: ['isCurrent:current::', 'isFirst:preselected', 'isPast:past::'],
2221
                templateName: 'wizardStepHeader',
2222
        })
2223
});
2224

    
2225
Synnefo.WizardSubMenusView = Synnefo.CollectionView.extend({
2226
        classNames: ['row', 'menus'],
2227
        content: Synnefo.wizards.vmWizard.stepsSubmenus,
2228
        itemViewClass: Synnefo.CollectionItemView.extend({
2229
                tagName: 'nav',
2230
                classNames: ['sub-menu'],
2231
                classNameBindings: ['isCurrent:current::', 'isFirst:preselected', 'isPast:past::'],
2232
                templateName: 'submenu'
2233
        })
2234

    
2235
});
2236

    
2237
Synnefo.WizardSubMenuView = Synnefo.CollectionView.extend({
2238
        tagName: 'ul',
2239
        content: function() {
2240
                var stepIndex = this.get('parentView').get('index');
2241
                return Synnefo.wizards.vmWizard.stepsSubmenus[--stepIndex].options;
2242
        }.property(),
2243
        removeOtherCurrent: function(clickedView) {
2244
                var childViews = this._childViews;
2245

    
2246
                for(var i=0; i<childViews.length; i++)
2247
                        if(childViews[i] !== clickedView)
2248
                                childViews[i].set('isCurrent', false);
2249
        },
2250
        itemViewClass: Synnefo.CollectionItemView.extend({
2251
                templateName: 'menuOption',
2252
                classNameBindings:['isCurrent:current::', 'isFirst:preselected'],
2253
                isCurrent: function(){
2254
                        if(this.get('isFirst')) return true;
2255
                }.property(),
2256
                move: function() {
2257
                        if(this.get('controller').get('onMove')) {
2258
                        this.get('parentView').removeOtherCurrent(this);
2259
                        this.set('isCurrent', true);
2260
                        }
2261
                }.observes('controller.onMove')
2262
        })
2263
});
2264

    
2265

    
2266
// The only buttons that are views are the buttons that move the wizard
2267
// The reason is that they shouldn't be isolated from the surrounding
2268
// (Their labels changes depanding the current step)
2269
Synnefo.WizardBtnBackView = Ember.View.extend({
2270
        classNames: ['nav', 'prev'],
2271
        tagName: 'a',
2272
        templateName: 'components/btns-span',
2273
        content: function(){
2274
                return this.get('controller').get('btnLeftLabel');
2275
        }.property('controller.btnLeftLabel'),
2276
        click: function() {
2277
                this.get('controller').send('moveBack');
2278
        }
2279
});
2280

    
2281
Synnefo.WizardBtnNextView = Ember.View.extend({
2282
        classNames: ['nav', 'next'],
2283
        tagName: 'a',
2284
        templateName: 'components/btns-span',
2285
        content: function(){
2286
                return this.get('controller').get('btnRightLabel');
2287
        }.property('controller.btnRightLabel'),
2288
        click: function() {
2289
                this.get('controller').send('moveNext');
2290
        }
2291
});
2292

    
2293

    
2294
Synnefo.WizardVmStep1View = Ember.View.extend({
2295
        classNames: ['step', 'step-1', 'current'],
2296
        templateName: 'wizardSteps/step-1',
2297
});
2298

    
2299
Synnefo.WizardImageView = Ember.View.extend({
2300
        tagName: 'li',
2301
        templateName: 'wizardSteps/image-view',
2302
        classNameBindings: ['type'],
2303
        imageData: function(){
2304
                // is there another way to extract all the data?
2305
                return Ember.Object.create(this.get('image').get('data'));
2306
        }.property('this.image'), // ??
2307
        type: function() {
2308
                var type;
2309
                var imageOwnerID = this.get('imageData').get('owner');
2310
                var isPublic = this.get('imageData').get('is_public');
2311
                var currentUserID = this.get('controller').get('account');
2312
                if(isPublic) {
2313
                        if(currentUserID === imageOwnerID)
2314
                                type = 'my-image'
2315
                        else
2316
                                Synnefo.SystemUUIDs.forEach(function(item) {
2317
                                                if(item === imageOwnerID) type = 'system-image';
2318
                                                else type = 'public-image'
2319
                                });
2320
                }
2321
                else {
2322
                        if(currentUserID === imageOwnerID)
2323
                                type = 'my-image';
2324
                        else
2325
                                type = 'shared-with-me';
2326
                }
2327
                return type;
2328
        }.property('imageData'), // ??
2329
        ownerEmail: function(){
2330
                var ownerUUId = this.get('imageData').get('owner');
2331
                var ownerEmail = Synnefo.AccountsUUIDs.get(ownerUUId);
2332
                if(this.get('type') !== 'system')
2333
                        return 'system';
2334
                else
2335
                        return ownerEmail;
2336
        }.property('this.image'), //??
2337
        didInsertElement: function() {
2338
                this.toggleDetailsArea();
2339
                this.selectImage();
2340
        },
2341
        toggleDetailsArea: function() {
2342
                var btnDetails = this.$().find('.btn-col a')
2343
                btnDetails.click(function(e) {
2344
                        e.preventDefault();
2345
                        e.stopPropagation();
2346
                        btnDetails.toggleClass('current');
2347
                        btnDetails.parents('li').find('.details').stop().slideToggle();
2348
                });
2349
        },
2350
        selectImage: function() {
2351
                var el = this.$();
2352
                el.click(function(e) {
2353
                        e.preventDefault();
2354
                        el.toggleClass('current');
2355
                })
2356

    
2357
        }
2358
 });;/* Components */
2359

    
2360
Synnefo.Btn1Component = Ember.Component.extend({
2361
        tagName: 'a',
2362
        click: function() {
2363
                this.sendAction("action", this.get('param'));
2364
        },
2365
        content: undefined // will be set if we want to print a message inside the span
2366
});
2367

    
2368
Synnefo.BtnsSpanComponent = Ember.Component.extend({
2369
        tagName: 'a',
2370
        templateName: 'components/btns-span',
2371
        click: function() {
2372
                this.sendAction("action");
2373
        }
2374
});
2375

    
2376

    
2377

    
2378
/* Add New Item */
2379

    
2380
Synnefo.AddNewComponent = Ember.Component.extend({
2381
        templateName: 'snfElem',
2382
        addNewBtn: true,
2383
        selectable: false,
2384
        icon: function() {
2385
                baseIcon = Synnefo.conf.sectors.findBy('destination', this.get('type')).icon;
2386
                return        baseIcon.replace('outline', 'create-full');
2387
        }.property(),
2388
        tagName: 'li',
2389
        status: 'add-new',
2390
        classNameBindings: ['status'],
2391
        attributeBindings: ['data-status, data-reveal-id'],
2392
        'data-status': function() {
2393
                return this.status;
2394
        }.property(),
2395
        name: function() {
2396
                var msg = 'Create New ';
2397
                var btnType = this.get('type')
2398
                switch(btnType){
2399
                        case 'vms':
2400
                                return msg + 'Machine';
2401
                        case 'networks':
2402
                                return msg + 'Network';
2403
                        case 'volumes':
2404
                                return msg + 'Volume';
2405
                        case 'snapshots':
2406
                                return msg + 'Snapshot';
2407
                        case 'images':
2408
                                return '+ Upload New Image';
2409
                }
2410
        }.property(),
2411
                click: function () {
2412
                this.sendAction('action');
2413
                }
2414
});
2415

    
2416

    
2417
/* Login Menu */
2418

    
2419
Synnefo.LoginMenuComponent = Ember.Component.extend({
2420
        classNames: ['login'],
2421
        didInsertElement: function() {
2422
                var self = this.$();
2423
                self.mouseenter(function(e){
2424
                self.find('ul').stop(true, true).slideDown(200);
2425
            });
2426
            self.mouseleave(function(e){
2427
        self.find('ul').stop(true, true).slideUp(200);
2428
    });
2429

    
2430
        }
2431
});
2432

    
2433

    
2434
/* Checkboxes and Radiobuttons */
2435

    
2436
Synnefo.SnfCheckboxComponent = Ember.Component.extend({
2437
        tagName: 'a',
2438
        classNames: ['check'],
2439
        templateName: 'components/select-btn',
2440
        initState: function() {
2441
                return this.get('initState');
2442
        }.property(),
2443
        didInsertElement: function() {
2444
                var el = this.$();
2445
                var self =this;
2446
                this.setInitClasses();
2447
                el.click(function(e) {
2448
            e.preventDefault();
2449
            e.stopPropagation();
2450
            self.changeState(el);
2451
            // ui.entitiesActionsEnabled();
2452
        });
2453
        },
2454
        setInitClasses: function() {
2455
                var self =this.$();
2456
                switch(this.initState){
2457
                        case 'unchecked': {
2458
                                this.uncheck(self);
2459
                                break;
2460
                        }
2461
                        case 'prechecked': {
2462
                                self.find('span').addClass('prechecked')
2463
                                this.check(self);
2464
                                break;
2465
                        }
2466
                }
2467
        },
2468
        // used to be in ui.checkbox
2469
        changeState : function(checkbox_link) {
2470
        $(checkbox_link).find('.snf-checkbox-unchecked, .snf-checkbox-checked').toggleClass('snf-checkbox-unchecked snf-checkbox-checked');
2471
        $(checkbox_link).closest('li').toggleClass('selected');
2472
    },
2473
    check : function(checkbox_link) {
2474
        $(checkbox_link).find('span').removeClass('snf-checkbox-unchecked').addClass('snf-checkbox-checked');
2475
        $(checkbox_link).closest('li').addClass('selected');
2476
    },
2477
    uncheck : function(checkbox_link) {
2478
        $(checkbox_link).find('span').removeClass('snf-checkbox-checked').addClass('snf-checkbox-unchecked');
2479
        $(checkbox_link).closest('li').removeClass('selected');
2480
    },
2481

    
2482
    reset: function(area) {
2483
        $(area).find('.snf-radio-checked').not('.prechecked').toggleClass('snf-radio-checked snf-radio-unchecked');
2484
        $(area).find('.snf-radio-unchecked.prechecked').toggleClass('snf-radio-checked snf-radio-unchecked');
2485
    },
2486
});
2487

    
2488

    
2489
/* Wizard Buttons */
2490

    
2491
Synnefo.Close1Component = Synnefo.BtnsSpanComponent.extend({
2492
        classNames: ['close'],
2493
        spanClass: 'snf-close' // has to be modified to array of strings
2494
});
2495

    
2496
        //  there's another close icon to confirm/info modals
2497

    
2498

    
2499
/*
2500

2501
Back and Next buttons are constructed as views and not as components
2502

2503
{{cancel-1 action="moveBack" step=currentStep minStep=1}}
2504
{{next-1 action="moveNext" step=currentStep maxStep=totalStep}}
2505

2506
Synnefo.Cancel1Component = Synnefo.BtnsSpanComponent.extend({
2507
        // classNameBindings: ['el3'], the element that should be focused when the user goes to the next step
2508
        content: 'CANCEL',
2509
        click: function(){
2510
                var currentStep =this.get('step');
2511
                var minStep =this.get('minStep');
2512
                console.log('minStep ', minStep);
2513
                this.sendAction();
2514
                if(currentStep === minStep)
2515
                        this.set('content', 'CANCEL');
2516
                else
2517
                        this.set('content', 'PREVIOUS');
2518

2519
        }
2520

2521
//  there's another close to modals
2522

2523
Synnefo.Cancel1Component = Synnefo.BtnsSpanComponent.extend({
2524
        classNames: ['nav', 'prev'],
2525
        // classNameBindings: ['el3'], the element that should be focused when the user goes to the next step
2526
        content: 'CANCEL'
2527
});
2528

2529
Synnefo.Next1Component = Synnefo.BtnsSpanComponent.extend({
2530
        classNames: ['nav', 'next'],
2531
        // classNameBindings: ['el3'], the element that should be focused when the user goes to the next step
2532
        content: 'NEXT',
2533
        click: function() {
2534
                var currentStep =this.get('step');
2535
                var maxStep =this.get('maxStep');
2536
                this.sendAction('action');
2537
                if(currentStep === maxStep)
2538
                        this.set('content', 'CREATE');
2539
                else
2540
                        this.set('content', 'NEXT');
2541
        }
2542
}); */