mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 04:16:31 +02:00
store secret key and value as an object to fix copy/show secret bug (#7926)
This commit is contained in:
parent
80fcc7907c
commit
05ca95e182
@ -13,6 +13,12 @@ export default DS.Model.extend(KeyMixin, {
|
||||
renewable: attr('boolean'),
|
||||
|
||||
secretData: attr('object'),
|
||||
secretKeyAndValue: computed('secretData', function() {
|
||||
const data = this.get('secretData');
|
||||
return Object.keys(data).map(key => {
|
||||
return { key, value: data[key] };
|
||||
});
|
||||
}),
|
||||
|
||||
dataAsJSONString: computed('secretData', function() {
|
||||
return JSON.stringify(this.get('secretData'), null, 2);
|
||||
|
||||
@ -46,10 +46,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#each-in modelForData.secretData as |key value|}}
|
||||
{{#info-table-row label=key value=value alwaysRender=true}}
|
||||
{{masked-input value=value displayOnly=true allowCopy=true}}
|
||||
{{#each modelForData.secretKeyAndValue as |secret|}}
|
||||
{{#info-table-row label=secret.key value=secret.value alwaysRender=true}}
|
||||
{{masked-input value=secret.value displayOnly=true allowCopy=true}}
|
||||
{{/info-table-row}}
|
||||
{{/each-in}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user