github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/serializers/job-scale.js (about)

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