github.com/hernad/nomad@v1.6.112/ui/app/serializers/service.js (about)

     1  /**
     2   * Copyright (c) HashiCorp, Inc.
     3   * SPDX-License-Identifier: MPL-2.0
     4   */
     5  
     6  import classic from 'ember-classic-decorator';
     7  import ApplicationSerializer from './application';
     8  
     9  @classic
    10  export default class ServiceSerializer extends ApplicationSerializer {
    11    normalize(typeHash, hash) {
    12      hash.AllocationID = hash.AllocID;
    13      hash.JobID = JSON.stringify([hash.JobID, hash.Namespace]);
    14      return super.normalize(typeHash, hash);
    15    }
    16  }