2017-12-15 21:39:18 +00:00
|
|
|
import { copy } from '@ember/object/internals';
|
2017-09-19 14:47:10 +00:00
|
|
|
import ApplicationSerializer from './application';
|
|
|
|
|
|
|
|
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);
|
|
|
|
},
|
|
|
|
});
|