open-consul/ui/packages/consul-ui/app/helpers/duration-from.js
John Cowen a389eab7b0
ui: Adds human formatting to nanosecond based session durations (#10062)
* ui: Adds human formatting to nanosecond based session durations
2021-04-28 12:12:56 +01:00

11 lines
269 B
JavaScript

import Helper from '@ember/component/helper';
import { inject as service } from '@ember/service';
export default class DurationFromHelper extends Helper {
@service('temporal') temporal;
compute([value], hash) {
return this.temporal.durationFrom(value);
}
}