From e614095d6c8a7fa00e08b350cdabf11e9e14d48a Mon Sep 17 00:00:00 2001 From: Mo <24444046+schogges@users.noreply.github.com> Date: Mon, 24 Feb 2025 14:28:31 +0100 Subject: [PATCH] feat(policy-summary): add spec to structured view (#3579) This is the first part and in a follow-up I'll add more view types for the config. Here I added the spec in a code block to the structured view, so the user can still get all information in this view and doesn't need to switch to YAML. --- I added a prop to hide the `Copy as K8s` button from the code block. I think the spec is agnostic to universal and k8s. --- ![image](https://github.com/user-attachments/assets/d7449a69-911f-405f-9be5-2c3e844a1fd0) Part of #3489 --------- Signed-off-by: schogges --- .../app/policies/components/PolicySummary.vue | 7 ++ .../src/app/policies/locales/en-us/index.yaml | 1 + .../x-code-block/ResourceCodeBlock.vue | 85 ++++++++++--------- 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/packages/kuma-gui/src/app/policies/components/PolicySummary.vue b/packages/kuma-gui/src/app/policies/components/PolicySummary.vue index eeb4d46a4b..92555d651e 100644 --- a/packages/kuma-gui/src/app/policies/components/PolicySummary.vue +++ b/packages/kuma-gui/src/app/policies/components/PolicySummary.vue @@ -67,6 +67,12 @@ + +