github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/serializers/job-plan.js (about) 1 import ApplicationSerializer from './application'; 2 import { get } from '@ember/object'; 3 4 export default class JobPlan extends ApplicationSerializer { 5 mapToArray = ['FailedTGAllocs']; 6 7 normalize(typeHash, hash) { 8 hash.PreemptionIDs = (get(hash, 'Annotations.PreemptedAllocs') || []).mapBy('ID'); 9 return super.normalize(...arguments); 10 } 11 }