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

13 lines
392 B
JavaScript
Raw Normal View History

import { assign } from '@ember/polyfills';
import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
normalize(typeHash, hash) {
const failures = hash.FailedTGAllocs || {};
hash.FailedTGAllocs = Object.keys(failures).map(key => {
return assign({ Name: key }, failures[key] || {});
});
return this._super(...arguments);
},
});