Merge pull request #57 from hashicorp/oss/merge-main-82bee42959b84a72644826b2b2ceecafe21239c0

[main] OSS to ENT merge of (82bee42)
This commit is contained in:
hc-github-team-secure-boundary authored and GitHub committed 2023-02-03 17:54:07 -05:00
commit 7d2fb2a302
3 files changed
+14 -1

No files matched your search

@@ -45,6 +45,8 @@ export default class extends Helper {
// =methods
compute([date]) {
if (!date) return;
const delta = date.valueOf() - this.clockTick.now;
const greatestMeaningfulUnit = unitMappings.reduce(
(currentValue, previousValue) => {
@@ -53,4 +53,12 @@ module('Integration | Helper | relative-datetime-live', function (hooks) {
await render(hbs`{{relative-datetime-live this.date}}`);
assert.dom(this.element).hasText('in 22 years');
});
test('it renders nothing when there is no date', async function (assert) {
assert.expect(1);
this.date = null;
await render(hbs`{{relative-datetime-live this.date}}`);
assert.dom(this.element).hasText('');
});
});
@@ -99,7 +99,10 @@
<form.input
@name='last seen'
@type='datetime'
@value={{concat relativeDate ', ' customFormat}}
@value={{if
@model.last_status_time
(concat relativeDate ', ' customFormat)
}}
@label={{t 'form.worker_last_seen.label'}}
@helperText={{t 'form.worker_last_seen.help'}}
@disabled={{true}}