open-nomad/ui/app/serializers/task-group.js
Alex Dadgar e5ec915ac3 sync
2017-09-19 10:08:23 -05:00

18 lines
427 B
JavaScript

import Ember from 'ember';
import ApplicationSerializer from './application';
const { copy } = Ember;
export default ApplicationSerializer.extend({
normalize(typeHash, hash) {
// Provide EphemeralDisk to each task
hash.Tasks.forEach(task => {
task.EphemeralDisk = copy(hash.EphemeralDisk);
});
hash.ReservedEphemeralDisk = hash.EphemeralDisk.SizeMB;
return this._super(typeHash, hash);
},
});