github.com/hernad/nomad@v1.6.112/ui/app/helpers/format-id.js (about)

     1  /**
     2   * Copyright (c) HashiCorp, Inc.
     3   * SPDX-License-Identifier: MPL-2.0
     4   */
     5  
     6  import Helper from '@ember/component/helper';
     7  
     8  export function formatID([model, relationship]) {
     9    const id = model.belongsTo(relationship).id();
    10    return { id, shortId: id.split('-')[0] };
    11  }
    12  
    13  export default Helper.helper(formatID);