github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/serializers/job-scale.js (about)

     1  import ApplicationSerializer from './application';
     2  
     3  export default class JobScale extends ApplicationSerializer {
     4    mapToArray = [{ beforeName: 'TaskGroups', afterName: 'TaskGroupScales' }];
     5  
     6    normalize(modelClass, hash) {
     7      hash.PlainJobId = hash.JobID;
     8      hash.ID = JSON.stringify([hash.JobID, hash.Namespace || 'default']);
     9      hash.JobID = hash.ID;
    10  
    11      return super.normalize(modelClass, hash);
    12    }
    13  }