UI: PKI Roles Edit (#18194)

This commit is contained in:
Chelsea Shaw
2022-12-02 10:42:14 -06:00
committed by GitHub
parent bb99bfa3bd
commit 42e1ba2110
28 changed files with 498 additions and 253 deletions

View File

@@ -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) {