Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / new_ui / ui / javascripts / okeanos-ember / obj.js @ d0fe8c12

History | View | Annotate | Download (2.1 kB)

1

    
2

    
3
Okeanos.Account = DS.Model.extend({
4
        email: DS.attr('string')
5
});
6

    
7
// CHECK can i use a single obj and not an array of obj
8
Okeanos.Account.FIXTURES = [{
9
        id: 001,
10
        email: "athina@mail.com"
11
}];
12

    
13

    
14

    
15
Okeanos.Vm = DS.Model.extend({
16
        // id: DS.attr('number'),         we do not define it ;)
17
        name: DS.attr('string'),
18
        hostname: DS.attr('string'),
19
        status: DS.attr('string'),
20
        os: DS.attr()
21
});
22

    
23
Okeanos.Vm.FIXTURES = 
24
[{
25
        id: 125355,
26
        name: "web-server",
27
        hostname: "user@snf-38389.vm.okeanos.grnet.gr",
28
        status: "running",
29
        os: "kubuntu"
30
},
31
{
32
        id: 12,
33
        name: "another-server",
34
        hostname: "user@snf-33333.vm.okeanos.grnet.gr",
35
        status: "off",
36
        os: "fedora"
37
}];
38

    
39
Okeanos.Net = DS.Model.extend({
40
        name: DS.attr('string'),
41
        status: DS.attr('string'),
42
        vms: DS.attr(),
43
        ips: DS.attr()
44
});
45

    
46
Okeanos.Net.FIXTURES = 
47
[{
48
        
49
}];
50

    
51

    
52

    
53

    
54
Okeanos.places = [{
55
          destination: "vms",
56
          title: "Virtual Machines",
57
          icon: "snf-pc-outline"
58
  },
59
  {
60
          destination: "nets",
61
          title: "Network",
62
          icon: "snf-network-outline"
63
  },
64
  {
65
          destination: "volumes",
66
          title: "Volumes",
67
          icon: "snf-volume-outline"
68
  },
69
  {
70
          destination: "pithos",
71
          title: "Pithos",
72
          icon: "snf-pithos-outline"
73
  },
74
  {
75
          destination: "images",
76
          title: "Images",
77
          icon: "snf-image-outline"
78
  },
79
  {
80
          destination: "snapshots",
81
          title: "Snapshots",
82
          icon: "snf-snapshot-outline"
83
  },
84
  {
85
          destination: "ips",
86
          title: "IPs",
87
          icon: "snf-nic-outline"
88
  },
89
  {
90
          destination: "sshkeys",
91
          title: "SSh Keys",
92
          icon: "snf-key-outline"
93
  }];
94

    
95

    
96
  Okeanos.AllActions = [{
97
          description:'start',
98
          'snf-components':['vms'],
99
          'enabled-status': ['off'],
100
          action: 'is this a function?'
101
},
102
 {
103
         description:'destroyElement',
104
         'snf-components': ['vms', 'nets'],
105
         'enabled-status': ['all'],
106
         action: 'is this a function?',
107
},
108
{
109
         description:'shutdown',
110
         'snf-components': ['vms'],
111
         'enabled-status': ['running'],
112
         action: 'is this a function?'
113
},
114
{
115
         description:'add machine',
116
         'snf-components': ['nets'],
117
         'enabled-status': ['active'],
118
         action: 'is this a function?'
119
},
120
{
121
         description:'action for all',
122
         'snf-components': ['vms', 'nets'],
123
         'enabled-status': ['all'],
124
         action: 'is this a function?'
125
}]