github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/helpers/format-volume-name.js (about)

     1  import { helper } from '@ember/component/helper';
     2  
     3  /**
     4   * Volume Name Formatter
     5   *
     6   * Usage: {{format-volume-name source=string isPerAlloc=boolean volumeExtension=string}}
     7   *
     8   * Outputs a title/link for volumes that are per_alloc-aware.
     9   * (when a volume is per_alloc, its route location requires an additional extension)
    10   */
    11  export function formatVolumeName(
    12    _,
    13    { source = '', isPerAlloc, volumeExtension }
    14  ) {
    15    return `${source}${isPerAlloc ? volumeExtension : ''}`;
    16  }
    17  
    18  export default helper(formatVolumeName);