Revision 0e2122e7 snf-cyclades-app/synnefo/ui/new_ui/ui/app/models/volume.js

b/snf-cyclades-app/synnefo/ui/new_ui/ui/app/models/volume.js
1
App.Volume = DS.Model.extend({
2
    
3
    name        : DS.attr(),
4
    status      : DS.attr(),
5
    size        : DS.attr('number'),
6
    storageType : DS.attr('string', {defaultValue: 'Archipelago'}),
7
    vm          : DS.belongsTo('vm', { async:false }),
8
    
9
    enabledActions: function() {
10
        return statusActionsVolume[this.get('status')].enabledActions;
11
    }.property('state'),
12

  
13
});
14

  
15

  
16
App.Volume.FIXTURES = [
17
    {
18
        id: 1,
19
        name: 'Ο αγαπημένος μου δίσκος',
20
        status: 'running',
21
        size: 10737418240,
22
        vm: 1,
23
    },
24
    {
25
        id: 2,
26
        name: 'Crypto',
27
        status: 'running',
28
        size: 2048,
29
        vm: 1,
30
    },
31
    {
32
        id: 3,
33
        name: 'Disk 3',
34
        status: 'running',
35
        size: 4096,
36
        storageType: 'drpd',
37
        vm: 3,
38
    },
39
];

Also available in: Unified diff