github.com/hernad/nomad@v1.6.112/ui/app/models/storage-node.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { attr, belongsTo } from '@ember-data/model'; 7 import Fragment from 'ember-data-model-fragments/fragment'; 8 import { fragmentOwner } from 'ember-data-model-fragments/attributes'; 9 10 export default class StorageNode extends Fragment { 11 @fragmentOwner() plugin; 12 13 @belongsTo('node') node; 14 @attr('string') allocID; 15 16 @attr('string') provider; 17 @attr('string') version; 18 @attr('boolean') healthy; 19 @attr('string') healthDescription; 20 @attr('date') updateTime; 21 @attr('boolean') requiresControllerPlugin; 22 @attr('boolean') requiresTopologies; 23 24 @attr() nodeInfo; 25 26 // Fragments can't have relationships, so provider a manual getter instead. 27 async getAllocation() { 28 return this.store.findRecord('allocation', this.allocID); 29 } 30 }