github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/serializers/job-plan.js (about) 1 import ApplicationSerializer from './application'; 2 import { get } from '@ember/object'; 3 import classic from 'ember-classic-decorator'; 4 5 @classic 6 export default class JobPlan extends ApplicationSerializer { 7 mapToArray = ['FailedTGAllocs']; 8 9 normalize(typeHash, hash) { 10 hash.PreemptionIDs = (get(hash, 'Annotations.PreemptedAllocs') || []).mapBy( 11 'ID' 12 ); 13 return super.normalize(...arguments); 14 } 15 }