open-nomad/ui/app/serializers/job-plan.js
2022-01-20 09:54:56 -05:00

14 lines
363 B
JavaScript

import ApplicationSerializer from './application';
import { get } from '@ember/object';
export default class JobPlan extends ApplicationSerializer {
mapToArray = ['FailedTGAllocs'];
normalize(typeHash, hash) {
hash.PreemptionIDs = (get(hash, 'Annotations.PreemptedAllocs') || []).mapBy(
'ID'
);
return super.normalize(...arguments);
}
}