mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
UI: PKI Roles Edit (#18194)
This commit is contained in:
@@ -2,6 +2,7 @@ import { typeOf } from '@ember/utils';
|
||||
import Component from '@glimmer/component';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
import { convertFromSeconds, largestUnitFromSeconds } from 'core/utils/duration-utils';
|
||||
|
||||
/**
|
||||
* @module InfoTableRow
|
||||
@@ -56,6 +57,14 @@ export default class InfoTableRowComponent extends Component {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
get formattedTtl() {
|
||||
const { value } = this.args;
|
||||
if (Number.isInteger(value)) {
|
||||
const unit = largestUnitFromSeconds(value);
|
||||
return `${convertFromSeconds(value, unit)}${unit}`;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@action
|
||||
calculateLabelOverflow(el) {
|
||||
|
||||
Reference in New Issue
Block a user