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/TTL helperEnabled/DisabledText fix #12212

Merged
merged 10 commits into from
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/12212.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: updating database TTL picker help text.
```
7 changes: 4 additions & 3 deletions ui/app/models/database/role.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export default Model.extend({
editType: 'ttl',
defaultValue: '1h',
label: 'Generated credentials’s Time-to-Live (TTL)',
subText: 'Vault will use the engine default of 1 hour',
helperTextDisabled: 'Vault will use a TTL of 1 hour.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Did Ivana have any thoughts on helperTextEnabled for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, but it'd be good to clarify a final time when she is back tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Monkeychip - Ivana wants to stick with the default text!

defaultShown: 'Engine default',
}),
max_ttl: attr({
editType: 'ttl',
defaultValue: '24h',
label: 'Generated credentials’s maximum Time-to-Live (Max TTL)',
subText: 'Vault will use the engine default of 24 hours',
helperTextDisabled: 'Vault will use a TTL of 24 hours.',
defaultShown: 'Engine default',
}),
username: attr('string', {
Expand All @@ -45,8 +45,9 @@ export default Model.extend({
rotation_period: attr({
editType: 'ttl',
defaultValue: '24h',
subText:
helperTextDisabled:
hellobontempo marked this conversation as resolved.
Show resolved Hide resolved
'Specifies the amount of time Vault should wait before rotating the password. The minimum is 5 seconds. Default is 24 hours.',
helperTextEnabled: 'Vault will rotate password after',
}),
creation_statements: attr('array', {
editType: 'stringArray',
Expand Down
4 changes: 2 additions & 2 deletions ui/lib/core/addon/templates/components/form-field.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
<TtlPicker2
@onChange={{action (action "setAndBroadcastTtl" valuePath)}}
@label={{labelString}}
@helperTextDisabled={{or attr.subText "Vault will use the default lease duration"}}
@helperTextEnabled={{or attr.subText "Lease will expire after"}}
@helperTextDisabled={{or attr.options.helperTextDisabled "Vault will use the default lease duration."}}
@helperTextEnabled={{or attr.options.helperTextEnabled "Lease will expire after"}}
@description={{attr.helpText}}
@initialValue={{or (get model valuePath) attr.options.setDefault}}
/>
Expand Down