refactor: 💡 existing vault form field to radio group (#1189)
Refactored existing vault form field to use radio card instead. This change is seen on details tab of a static credential store. ✅ Closes: ICU-5171 Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
This commit is contained in:
1 parent
66d115ab06
commit
ed7e24b328
2 files changed
+43
-6
No files matched your search
@@ -319,6 +319,8 @@ credential-store:
|
||||
types:
|
||||
vault: Vault
|
||||
static: Static
|
||||
help:
|
||||
vault: The host details are brokered by a Vault server.
|
||||
form:
|
||||
address:
|
||||
label: Address
|
||||
|
||||
@@ -6,12 +6,47 @@
|
||||
@showEditToggle={{if @model.isNew false true}}
|
||||
as |form|
|
||||
>
|
||||
<form.input
|
||||
@value={{@model.type}}
|
||||
@label={{t 'form.type.label'}}
|
||||
readonly={{true}}
|
||||
@disabled={{true}}
|
||||
/>
|
||||
{{#if (feature-flag 'static-credentials')}}
|
||||
<form.fieldset>
|
||||
<:title>{{t 'form.type.label'}}</:title>
|
||||
<:body>
|
||||
{{#if @model.isNew}}
|
||||
{{! Code to allow option to select between cred. store types (vault or static) when it is first created goes here}}
|
||||
<form.input
|
||||
@value={{@model.type}}
|
||||
readonly={{true}}
|
||||
@disabled={{true}}
|
||||
/>
|
||||
{{else}}
|
||||
<form.radioGroup
|
||||
@name='types'
|
||||
@selectedValue={{@model.type}}
|
||||
as |radioGroup|
|
||||
>
|
||||
<radioGroup.card
|
||||
@label={{t
|
||||
(concat 'resources.credential-store.types.' @model.type)
|
||||
}}
|
||||
@helperText={{t
|
||||
(concat 'resources.credential-store.help.' @model.type)
|
||||
}}
|
||||
@value={{@model.type}}
|
||||
@layout='wide'
|
||||
readonly={{true}}
|
||||
@disabled={{true}}
|
||||
/>
|
||||
</form.radioGroup>
|
||||
{{/if}}
|
||||
</:body>
|
||||
</form.fieldset>
|
||||
{{else}}
|
||||
<form.input
|
||||
@value={{@model.type}}
|
||||
@label={{t 'form.type.label'}}
|
||||
readonly={{true}}
|
||||
@disabled={{true}}
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
<form.input
|
||||
@name='name'
|
||||
|
||||
Reference in new issue
Block a user