github.com/manicqin/nomad@v0.9.5/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  });