-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI/Hide empty masked PKI row values #14400
Conversation
@@ -75,12 +75,6 @@ | |||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}} | |||
@value={{date-format (get this.model attr.name) "MMM dd, yyyy hh:mm:ss a" isFormatted=true}} | |||
/> | |||
{{else if (and (get this.model attr.name) (eq attr.name "revocationTime"))}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revocationTime
won't exist for a newly generated credential. (I had originally added this before understanding exactly when this template renders)
@@ -45,7 +45,7 @@ | |||
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}} | |||
@value={{date-format (get this.model attr.name) "MMM dd, yyyy hh:mm:ss a" isFormatted=true}} | |||
/> | |||
{{else if (and (get this.model attr.name) (eq attr.name "revocationTime"))}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(get this.model attr.name)
returns 0
so this block wasn't being hit and Revocation time: 0
was displaying in the UI. Now zero is passed to the date-format
helper which errors so revocation time isn't displayed unless it has a date value
@@ -8,15 +8,15 @@ | |||
{{/if}} | |||
</h2> | |||
{{#if (or this.model.certificate this.model.csr)}} | |||
{{#if (not (eq this.model.canParse true))}} | |||
{{#if (eq this.model.canParse false)}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canParse
is only set when it goes through the parse-pki-cert
helper - so we want to check for false
specifically, as it could be undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, excellent test coverage, and thank you for the PR comments 👏
After some changes made to the
InfoTableRow
component in PR #13585 empty masked values were displaying in the certificate show pages. This PR fixes so only masked inputs with values displayScreeshot of bug

With fix
