open-nomad/ui/app/helpers/format-scheduled-hertz.js
2021-03-31 09:29:14 -07:00

17 lines
460 B
JavaScript

import Helper from '@ember/component/helper';
import { formatScheduledHertz } from 'nomad-ui/utils/units';
/**
* Scheduled Hertz Formatter
*
* Usage: {{format-scheduled-hertz hertz}}
*
* Outputs the frequency reduced to the resolution the scheduler
* and job spec operate at.
*/
function formatScheduledHertzHelper([hertz], { start }) {
return formatScheduledHertz(hertz, start || 'MHz');
}
export default Helper.helper(formatScheduledHertzHelper);