2021-03-26 17:24:46 +00:00
|
|
|
import Helper from '@ember/component/helper';
|
|
|
|
import { formatScheduledBytes } from 'nomad-ui/utils/units';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Scheduled Bytes Formatter
|
|
|
|
*
|
2021-03-27 00:02:54 +00:00
|
|
|
* 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.
|
|
|
|
*/
|
2021-03-27 00:02:54 +00:00
|
|
|
function formatScheduledBytesHelper([bytes], { start }) {
|
|
|
|
return formatScheduledBytes(bytes, start);
|
2021-03-26 17:24:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Helper.helper(formatScheduledBytesHelper);
|