Skip to content
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: Transit Key TTL not initializing to toggled off #20731

Merged
merged 5 commits into from
May 25, 2023

Conversation

hellobontempo
Copy link
Contributor

@hellobontempo hellobontempo commented May 24, 2023

Before the fix, when the auto-rotation period was set to 0, the ttl input would default to enabled with a value of 30 days if a user clicked save, the model did not actually update and kept the 0 value. This is because the form was just rendering default values, and not the actual value of the field.

Now the ttl input updates the model value whenever it is changed. If the auto_rotate_period: 0 then the TTL is initializes as disabled - accurately representing the current value of the parameter

🐛 Bug

Screen Recording 2023-05-24 at 10 09 55 AM

@hellobontempo hellobontempo added ui bug Used to indicate a potential bug labels May 24, 2023
@hellobontempo hellobontempo added this to the 1.14 milestone May 24, 2023
Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch. We've for sure hit this elsewhere in the app. Essentially, default display values not being set on the model so if they are never changed, then whatever is the default value on the model is saved and that value doesn't always match the display value.

@hellobontempo hellobontempo enabled auto-merge (squash) May 25, 2023 16:08
@hellobontempo hellobontempo merged commit d2189fd into main May 25, 2023
@hellobontempo hellobontempo deleted the ui/VAULT-16493/fix-transit-key-ttl branch May 25, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants