open-nomad/ui/app/helpers/format-scheduled-bytes.js

17 lines
459 B
JavaScript
Raw Normal View History

2021-03-26 17:24:46 +00:00
import Helper from '@ember/component/helper';
import { formatScheduledBytes } from 'nomad-ui/utils/units';
/**
* Scheduled Bytes Formatter
*
* Usage: {{format-scheduled-bytes bytes start="KiB"}}
2021-03-26 17:24:46 +00:00
*
* Outputs the bytes reduced to the resolution the scheduler
* and job spec operate at.
*/
function formatScheduledBytesHelper([bytes], { start }) {
return formatScheduledBytes(bytes, start);
2021-03-26 17:24:46 +00:00
}
export default Helper.helper(formatScheduledBytesHelper);