diff --git a/changelog/14224.txt b/changelog/14224.txt new file mode 100644 index 000000000..f7e566b25 --- /dev/null +++ b/changelog/14224.txt @@ -0,0 +1,3 @@ +```release-note:bug + ui: Fix default TTL display and set on database role +``` diff --git a/ui/app/models/database/role.js b/ui/app/models/database/role.js index 345427028..fb3d71670 100644 --- a/ui/app/models/database/role.js +++ b/ui/app/models/database/role.js @@ -26,7 +26,7 @@ export default Model.extend({ noDefault: true, possibleValues: ['static', 'dynamic'], }), - ttl: attr({ + default_ttl: attr({ editType: 'ttl', defaultValue: '1h', label: 'Generated credentials’s Time-to-Live (TTL)', @@ -98,7 +98,7 @@ export default Model.extend({ roleSettingAttrs: computed(function () { // logic for which get displayed is on DatabaseRoleSettingForm let allRoleSettingFields = [ - 'ttl', + 'default_ttl', 'max_ttl', 'username', 'rotation_period', diff --git a/ui/app/templates/components/database-role-edit.hbs b/ui/app/templates/components/database-role-edit.hbs index b504c0a27..5e8a8e854 100644 --- a/ui/app/templates/components/database-role-edit.hbs +++ b/ui/app/templates/components/database-role-edit.hbs @@ -63,6 +63,14 @@ @label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}} @value={{stringify (get @model attr.name)}} /> + {{else if (eq attr.options.editType "ttl")}} + {{else}}