diff --git a/changelog/25235.txt b/changelog/25235.txt new file mode 100644 index 0000000000..d4df23ebf4 --- /dev/null +++ b/changelog/25235.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Do not disable JSON display toggle for KV version 2 secrets +``` \ No newline at end of file diff --git a/ui/lib/core/addon/components/json-editor.hbs b/ui/lib/core/addon/components/json-editor.hbs index ec345ae0ca..ca427b194d 100644 --- a/ui/lib/core/addon/components/json-editor.hbs +++ b/ui/lib/core/addon/components/json-editor.hbs @@ -25,7 +25,7 @@ data-test-restore-example /> {{/if}} - {{#if (and @obscure @readOnly)}} + {{#if (and @allowObscure @readOnly)}} {{! For safety we only use obscured values in readonly mode }}
diff --git a/ui/lib/core/addon/components/json-editor.js b/ui/lib/core/addon/components/json-editor.js index e5aa75c5ea..f924b5983a 100644 --- a/ui/lib/core/addon/components/json-editor.js +++ b/ui/lib/core/addon/components/json-editor.js @@ -43,7 +43,7 @@ export default class JsonEditorComponent extends Component { } get showObfuscatedData() { - return this.args.readOnly && this.args.obscure && !this.revealValues; + return this.args.readOnly && this.args.allowObscure && !this.revealValues; } get obfuscatedData() { return stringify([obfuscateData(JSON.parse(this.args.value))], {}); diff --git a/ui/lib/core/addon/components/kv-object-editor.hbs b/ui/lib/core/addon/components/kv-object-editor.hbs index 5951c5b704..04663d3a7a 100644 --- a/ui/lib/core/addon/components/kv-object-editor.hbs +++ b/ui/lib/core/addon/components/kv-object-editor.hbs @@ -25,7 +25,6 @@ @value={{row.name}} placeholder={{this.placeholders.key}} {{on "change" (fn this.updateRow row index)}} - {{on "input" (fn this.validateKey index)}} class="input" />
@@ -71,7 +70,7 @@ {{/unless}} - {{#if (includes index this.whitespaceWarningRows)}} + {{#if (this.showWhitespaceWarning row.name)}}
{{/if}} + {{#if (this.showNonStringWarning row.value)}} +
+ +
+ {{/if}} {{/each}} {{#if this.hasDuplicateKeys}} diff --git a/ui/lib/core/addon/components/kv-object-editor.js b/ui/lib/core/addon/components/kv-object-editor.js index 98b13599bd..2a1f47e8c4 100644 --- a/ui/lib/core/addon/components/kv-object-editor.js +++ b/ui/lib/core/addon/components/kv-object-editor.js @@ -9,7 +9,6 @@ import { isNone } from '@ember/utils'; import { assert } from '@ember/debug'; import { action } from '@ember/object'; import { guidFor } from '@ember/object/internals'; -import { A } from '@ember/array'; import KVObject from 'vault/lib/kv-object'; /** @@ -26,7 +25,7 @@ import KVObject from 'vault/lib/kv-object'; * ``` * @param {string} value - the value is captured from the model. * @param {function} onChange - function that captures the value on change - * @param {boolean} [isMasked = false] - when true the renders instead of the default