2018-08-17 18:22:26 +00:00
|
|
|
import ApplicationSerializer from './application';
|
2019-04-16 19:11:43 +00:00
|
|
|
import { get } from '@ember/object';
|
2018-08-17 18:22:26 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
export default class JobPlan extends ApplicationSerializer {
|
2020-08-20 17:14:49 +00:00
|
|
|
mapToArray = ['FailedTGAllocs'];
|
|
|
|
|
2018-08-17 18:22:26 +00:00
|
|
|
normalize(typeHash, hash) {
|
2019-04-16 19:11:43 +00:00
|
|
|
hash.PreemptionIDs = (get(hash, 'Annotations.PreemptedAllocs') || []).mapBy('ID');
|
2020-06-10 13:49:16 +00:00
|
|
|
return super.normalize(...arguments);
|
|
|
|
}
|
|
|
|
}
|