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

     1  import Helper from '@ember/component/helper';
     2  import { formatScheduledBytes } from 'nomad-ui/utils/units';
     3  
     4  /**
     5   * Scheduled Bytes Formatter
     6   *
     7   * Usage: {{format-scheduled-bytes bytes start="KiB"}}
     8   *
     9   * Outputs the bytes reduced to the resolution the scheduler
    10   * and job spec operate at.
    11   */
    12  function formatScheduledBytesHelper([bytes], { start }) {
    13    return formatScheduledBytes(bytes, start);
    14  }
    15  
    16  export default Helper.helper(formatScheduledBytesHelper);