github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/app/serializers/task.js (about) 1 import ApplicationSerializer from './application'; 2 3 export default ApplicationSerializer.extend({ 4 normalize(typeHash, hash) { 5 // Lift the reserved resource numbers out of the Resources object 6 const resources = hash.Resources; 7 if (resources) { 8 hash.ReservedMemory = resources.MemoryMB; 9 hash.ReservedCPU = resources.CPU; 10 hash.ReservedDisk = resources.DiskMB; 11 hash.ReservedEphemeralDisk = hash.EphemeralDisk.SizeMB; 12 } 13 14 return this._super(typeHash, hash); 15 }, 16 });