diff --git a/changelog/29720.txt b/changelog/29720.txt new file mode 100644 index 0000000000..9748c332a3 --- /dev/null +++ b/changelog/29720.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Use Hds::CodeBlock component to replace readonly JsonEditor instances +``` \ No newline at end of file diff --git a/ui/app/templates/components/oidc/scope-form.hbs b/ui/app/templates/components/oidc/scope-form.hbs index 5d14013a2f..1e77ed17e8 100644 --- a/ui/app/templates/components/oidc/scope-form.hbs +++ b/ui/app/templates/components/oidc/scope-form.hbs @@ -82,7 +82,7 @@

Example of a JSON template for scopes:

- +

The full list of template parameters can be found diff --git a/ui/app/templates/vault/cluster/access/oidc/scopes/scope/details.hbs b/ui/app/templates/vault/cluster/access/oidc/scopes/scope/details.hbs index 343afaa83d..f4ad8f3c99 100644 --- a/ui/app/templates/vault/cluster/access/oidc/scopes/scope/details.hbs +++ b/ui/app/templates/vault/cluster/access/oidc/scopes/scope/details.hbs @@ -56,12 +56,9 @@

- + + + JSON Template + +
\ No newline at end of file diff --git a/ui/app/templates/vault/cluster/policy/show.hbs b/ui/app/templates/vault/cluster/policy/show.hbs index 4e5106108a..69a6319baa 100644 --- a/ui/app/templates/vault/cluster/policy/show.hbs +++ b/ui/app/templates/vault/cluster/policy/show.hbs @@ -46,15 +46,18 @@
-
- -
+ {{#if this.model.policy}} +
+ + + Policy + + + ({{if (eq this.policyType "acl") (concat this.uppercase this.model.format " format")}}) + + +
+ {{/if}} {{#if this.model.paths}}

Paths

diff --git a/ui/lib/core/addon/components/policy-example.hbs b/ui/lib/core/addon/components/policy-example.hbs index e57859fd6c..a63ecf13a1 100644 --- a/ui/lib/core/addon/components/policy-example.hbs +++ b/ui/lib/core/addon/components/policy-example.hbs @@ -54,14 +54,7 @@

{{/if}}
- +

More information about diff --git a/ui/lib/kubernetes/addon/components/page/role/details.hbs b/ui/lib/kubernetes/addon/components/page/role/details.hbs index 1693464733..0ce251acf0 100644 --- a/ui/lib/kubernetes/addon/components/page/role/details.hbs +++ b/ui/lib/kubernetes/addon/components/page/role/details.hbs @@ -52,14 +52,11 @@ {{#if @model.generatedRoleRules}}

Generated role rules

- + + + Role rules + +
{{/if}} diff --git a/ui/tests/integration/components/oidc/scope-form-test.js b/ui/tests/integration/components/oidc/scope-form-test.js index b14bfd8146..a2454434d1 100644 --- a/ui/tests/integration/components/oidc/scope-form-test.js +++ b/ui/tests/integration/components/oidc/scope-form-test.js @@ -155,16 +155,6 @@ module('Integration | Component | oidc/scope-form', function (hooks) { const MODAL = (e) => `[data-test-scope-modal="${e}"]`; this.model = this.store.createRecord('oidc/scope'); - // formatting here is purposeful so that it matches formatting in the template modal - const exampleTemplate = `{ - "username": {{identity.entity.aliases.$MOUNT_ACCESSOR.name}}, - "contact": { - "email": {{identity.entity.metadata.email}}, - "phone_number": {{identity.entity.metadata.phone_number}} - }, - "groups": {{identity.entity.groups.names}} -}`; - await render(hbs` `[data-test-example-modal-text=${type}]`, - jsonText: '[data-test-component="code-mirror-modifier"]', + jsonText: '.hds-code-block', informationLink: '[data-test-example-modal-information-link]', };