UI/Make revocation time and credential dates human-readable (#13196)
* adds date time helper to generated creds * makes revocation time human-readable
This commit is contained in:
parent
e43f2bb80c
commit
ba5ad97e78
|
@ -42,7 +42,9 @@
|
|||
{{/unless}}
|
||||
{{#each model.attrs as |attr|}}
|
||||
{{#if (eq attr.type "object")}}
|
||||
<InfoTableRow @label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}} @value={{stringify (get model attr.name)}} />
|
||||
<InfoTableRow
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
@value={{stringify (get model attr.name)}} />
|
||||
{{else}}
|
||||
{{#if (or
|
||||
(eq attr.name "key")
|
||||
|
@ -51,7 +53,9 @@
|
|||
(eq attr.name "privateKey")
|
||||
attr.options.masked
|
||||
)}}
|
||||
<InfoTableRow @label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}} @value={{get model attr.name}}>
|
||||
<InfoTableRow
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
@value={{get model attr.name}}>
|
||||
<MaskedInput
|
||||
@value={{get model attr.name}}
|
||||
@name={{attr.name}}
|
||||
|
@ -59,8 +63,18 @@
|
|||
@allowCopy={{true}}
|
||||
/>
|
||||
</InfoTableRow>
|
||||
{{else if (and (get model attr.name) (or (eq attr.name "issueDate") (eq attr.name "expiryDate")))}}
|
||||
<InfoTableRow data-test-table-row
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
@value={{date-format (get model attr.name) 'MMM dd, yyyy hh:mm:ss a' isFormatted=true}} />
|
||||
{{else if (and (get model attr.name) (eq attr.name "revocationTime"))}}
|
||||
<InfoTableRow data-test-table-row
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
@value={{date-format (get model attr.name) 'MMM dd, yyyy hh:mm:ss a'}} />
|
||||
{{else}}
|
||||
<InfoTableRow @label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}} @value={{get model attr.name}} />
|
||||
<InfoTableRow
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
@value={{get model attr.name}} />
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
|
|
@ -28,9 +28,13 @@
|
|||
/>
|
||||
</InfoTableRow>
|
||||
{{else if (and (get model attr.name) (or (eq attr.name "issueDate") (eq attr.name "expiryDate")))}}
|
||||
<InfoTableRow data-test-table-row
|
||||
<InfoTableRow data-test-table-row
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
@value={{date-format (get model attr.name) 'MMM dd, yyyy hh:mm:ss a' isFormatted=true}} />
|
||||
{{else if (and (get model attr.name) (eq attr.name "revocationTime"))}}
|
||||
<InfoTableRow data-test-table-row
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
@value={{date-format (get model attr.name) 'MMM dd, yyyy hh:mm:ss a'}} />
|
||||
{{else}}
|
||||
<InfoTableRow data-test-table-row
|
||||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
||||
|
|
Loading…
Reference in New Issue