open-nomad/ui/app/serializers/job-plan.js

12 lines
351 B
JavaScript
Raw Normal View History

import ApplicationSerializer from './application';
2019-04-16 19:11:43 +00:00
import { get } from '@ember/object';
export default class JobPlan extends ApplicationSerializer {
mapToArray = ['FailedTGAllocs'];
normalize(typeHash, hash) {
2019-04-16 19:11:43 +00:00
hash.PreemptionIDs = (get(hash, 'Annotations.PreemptedAllocs') || []).mapBy('ID');
return super.normalize(...arguments);
}
}