github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/app/models/storage-node.js (about)

     1  import attr from 'ember-data/attr';
     2  import { belongsTo } from 'ember-data/relationships';
     3  import Fragment from 'ember-data-model-fragments/fragment';
     4  import { fragmentOwner } from 'ember-data-model-fragments/attributes';
     5  
     6  export default Fragment.extend({
     7    plugin: fragmentOwner(),
     8  
     9    node: belongsTo('node'),
    10    allocID: attr('string'),
    11  
    12    provider: attr('string'),
    13    version: attr('string'),
    14    healthy: attr('boolean'),
    15    healthDescription: attr('string'),
    16    updateTime: attr('date'),
    17    requiresControllerPlugin: attr('boolean'),
    18    requiresTopologies: attr('boolean'),
    19  
    20    nodeInfo: attr(),
    21  
    22    // Fragments can't have relationships, so provider a manual getter instead.
    23    async getAllocation() {
    24      return this.store.findRecord('allocation', this.allocID);
    25    },
    26  });