diff --git a/packages/kuma-gui/features/application/MainNavigation.feature b/packages/kuma-gui/features/application/MainNavigation.feature index 8e0a84d16..559893b6a 100644 --- a/packages/kuma-gui/features/application/MainNavigation.feature +++ b/packages/kuma-gui/features/application/MainNavigation.feature @@ -95,4 +95,4 @@ Feature: application / MainNavigation inbound: - port: 51112 """ - And the "[data-testid='data-plane-connection-inbound-summary-stats-view-tab'].active" element exists + And the "[data-testid='data-plane-connection-inbound-summary-stats-view-tab'].active" element exists diff --git a/packages/kuma-gui/features/hostname-generators/HostnameGeneratorSummary.feature b/packages/kuma-gui/features/hostname-generators/HostnameGeneratorSummary.feature new file mode 100644 index 000000000..511aead1e --- /dev/null +++ b/packages/kuma-gui/features/hostname-generators/HostnameGeneratorSummary.feature @@ -0,0 +1,32 @@ +Feature: HostnameGenerator summary + + Background: + Given the CSS selectors + | Alias | Selector | + | summary | [data-testid='summary'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | + + Scenario: Switching to YAML format and back + Given the URL "/hostnamegenerators" responds with + """ + body: + items: + - name: + """ + When I visit the "/hostname-generators/" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists + + Examples: + | HostnameGenerator | + | local-mesh-external-service | diff --git a/packages/kuma-gui/features/mesh/builtin-gateways/BuiltinGatewaySummary.feature b/packages/kuma-gui/features/mesh/builtin-gateways/BuiltinGatewaySummary.feature new file mode 100644 index 000000000..5a10c468b --- /dev/null +++ b/packages/kuma-gui/features/mesh/builtin-gateways/BuiltinGatewaySummary.feature @@ -0,0 +1,40 @@ +Feature: BuiltinGateway summary + + Background: + Given the CSS selectors + | Alias | Selector | + | summary | [data-testid='summary'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | + And the environment + """ + KUMA_MESHGATEWAY_COUNT: 1 + """ + And the URL "/meshes/default/meshgateways" responds with + """ + body: + items: + - name: gateway-1 + labels: + kuma.io/origin: zone + kuma.io/zone: zone-1 + kuma.io/display-name: gateway-1 + """ + + Scenario: Switching to YAML format and back + When I visit the "" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists + + Examples: + | URL | + | /meshes/default/gateways/builtin/gateway-1 | diff --git a/packages/kuma-gui/features/mesh/dataplanes/DataplanePolicySummary.feature b/packages/kuma-gui/features/mesh/dataplanes/DataplanePolicySummary.feature index 1f0373273..9dafba37f 100644 --- a/packages/kuma-gui/features/mesh/dataplanes/DataplanePolicySummary.feature +++ b/packages/kuma-gui/features/mesh/dataplanes/DataplanePolicySummary.feature @@ -3,9 +3,12 @@ Feature: Dataplane policy summary Background: Given the CSS selectors | Alias | Selector | - | summary-slideout-container | [data-testid='summary'] [data-testid='slideout-container'] | + | summary | [data-testid='summary'] | + | summary-slideout-container | $summary [data-testid='slideout-container'] | | summary-title | $summary-slideout-container [data-testid='slideout-title'] | | summary-content | $summary-slideout-container [data-testid='data-plane-policy-summary-view'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | Scenario: Policy Summary View has expected content Given the URL "/meshes/default/meshhttproutes/the-other-http-route" responds with @@ -46,4 +49,36 @@ Feature: Dataplane policy summary And the "$summary-content" element contains "MeshGateway:foo" And the "$summary-content" element contains "Namespace" And the "$summary-content" element contains "kuma-system" - And the "$summary-content [data-testid='k-code-block']" element exists + And the "$select-preference" element exists + + Scenario: Switching to YAML format and back + Given the URL "/meshes/default/meshhttproutes/" responds with + """ + body: + type: MeshHTTPRoute + mesh: default + name: + labels: + k8s.kuma.io/namespace: kuma-system + kuma.io/display-name: foo + spec: + targetRef: + kind: MeshGateway + name: foo + """ + When I visit the "/meshes/default/data-planes/dataplane-1/policies/meshhttproutes/" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists + + Examples: + | PolicyName | + | the-other-http-route | diff --git a/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature b/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature index 08df8a662..6009c964c 100644 --- a/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature +++ b/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature @@ -6,6 +6,8 @@ Feature: Dataplane summary | item | [data-testid='data-plane-collection'] tbody tr | | summary | [data-testid='summary'] | | close-summary-button | $summary [data-testid='slideout-close-icon'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | And the environment """ KUMA_SUBSCRIPTION_COUNT: 2 @@ -47,3 +49,21 @@ Feature: Dataplane summary """ When I visit the "/meshes/default/data-planes/test-data-plane-1?page=2&size=50" URL Then the "$summary" element exists + + Scenario: Switching to YAML format and back + Given the environment + """ + KUMA_DATAPLANE_COUNT: 1 + """ + When I visit the "/meshes/default/data-planes/test-data-plane-1" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists diff --git a/packages/kuma-gui/features/mesh/dataplanes/overview/summary/Clusters.feature b/packages/kuma-gui/features/mesh/dataplanes/overview/summary/Clusters.feature index c45e1acf7..a4d0df2cf 100644 --- a/packages/kuma-gui/features/mesh/dataplanes/overview/summary/Clusters.feature +++ b/packages/kuma-gui/features/mesh/dataplanes/overview/summary/Clusters.feature @@ -2,7 +2,7 @@ Feature: mesh / dataplanes / connections / clusters Scenario: The inbound clusters tab correctly filters by 'localhost_' Given the CSS selectors - | Alias | Selector | + | Alias | Selector | | code | [data-testid='data-plane-connection-inbound-summary-clusters-view'] [data-testid='k-code-block'] | And the URL "/meshes/mesh-name/dataplanes/service-64cbb7b8b5-6g94n.namespace/_overview" responds with """ @@ -30,7 +30,7 @@ Feature: mesh / dataplanes / connections / clusters Scenario: The outbound clusters tab correctly filters by '' Given the CSS selectors - | Alias | Selector | + | Alias | Selector | | code | [data-testid='data-plane-connection-outbound-summary-clusters-view'] [data-testid='k-code-block'] | And the URL "/meshes/mesh-name/dataplanes/service-64cbb7b8b5-6g94n.namespace/stats" responds with """ diff --git a/packages/kuma-gui/features/mesh/policies/PolicySummary.feature b/packages/kuma-gui/features/mesh/policies/PolicySummary.feature index 30e56a28c..c0d53935e 100644 --- a/packages/kuma-gui/features/mesh/policies/PolicySummary.feature +++ b/packages/kuma-gui/features/mesh/policies/PolicySummary.feature @@ -7,6 +7,8 @@ Feature: Policy summary | item | $items tbody tr | | summary | [data-testid='summary'] | | close-summary-button | $summary [data-testid='slideout-close-icon'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | And the URL "/meshes/default/meshfaultinjections" responds with """ body: @@ -38,3 +40,21 @@ Feature: Policy summary """ When I visit the "/meshes/default/policies/meshfaultinjections/mfi-1?page=2&size=50" URL Then the "$summary" element exists + + Scenario: Switching to YAML format and back + Given the environment + """ + KUMA_MESHFAULTINJECTION_COUNT: 1 + """ + When I visit the "/meshes/default/policies/meshfaultinjections/mfi-1" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists diff --git a/packages/kuma-gui/features/mesh/services/mesh-external-services/MeshExternalServiceSummary.feature b/packages/kuma-gui/features/mesh/services/mesh-external-services/MeshExternalServiceSummary.feature new file mode 100644 index 000000000..58544e3aa --- /dev/null +++ b/packages/kuma-gui/features/mesh/services/mesh-external-services/MeshExternalServiceSummary.feature @@ -0,0 +1,47 @@ +Feature: MeshExternalService summary + + Background: + Given the CSS selectors + | Alias | Selector | + | summary | [data-testid='summary'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | + And the environment + """ + KUMA_SERVICE_COUNT: 1 + """ + + Rule: In a namespaced environment + + Background: + Given the environment + """ + KUMA_ENVIRONMENT: kubernetes + """ + And the URL "/meshes/default/meshexternalservices" responds with + """ + body: + items: + - name: monitor-proxy-0.kuma-demo + labels: + kuma.io/display-name: monitor-proxy-0 + k8s.kuma.io/namespace: kuma-demo + """ + + Scenario Outline: Switching to YAML format and back + When I visit the "" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists + + Examples: + | URL | + | /meshes/default/services/mesh-external-services/monitor-proxy-0.kuma-demo | diff --git a/packages/kuma-gui/features/mesh/services/mesh-multi-zone-services/MeshMultiZoneServiceSummary.feature b/packages/kuma-gui/features/mesh/services/mesh-multi-zone-services/MeshMultiZoneServiceSummary.feature new file mode 100644 index 000000000..08f1b484d --- /dev/null +++ b/packages/kuma-gui/features/mesh/services/mesh-multi-zone-services/MeshMultiZoneServiceSummary.feature @@ -0,0 +1,47 @@ +Feature: MeshMultiZoneService summary + + Background: + Given the CSS selectors + | Alias | Selector | + | summary | [data-testid='summary'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | + And the environment + """ + KUMA_SERVICE_COUNT: 1 + """ + + Rule: In a namespaced environment + + Background: + Given the environment + """ + KUMA_ENVIRONMENT: kubernetes + """ + And the URL "/meshes/default/meshmultizoneservices" responds with + """ + body: + items: + - name: monitor-proxy-0.kuma-demo + labels: + kuma.io/display-name: monitor-proxy-0 + k8s.kuma.io/namespace: kuma-demo + """ + + Scenario Outline: Switching to YAML format and back + When I visit the "" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists + + Examples: + | URL | + | /meshes/default/services/mesh-multi-zone-services/monitor-proxy-0.kuma-demo | diff --git a/packages/kuma-gui/features/mesh/services/mesh-services/MeshServiceSummary.feature b/packages/kuma-gui/features/mesh/services/mesh-services/MeshServiceSummary.feature new file mode 100644 index 000000000..877c4fff8 --- /dev/null +++ b/packages/kuma-gui/features/mesh/services/mesh-services/MeshServiceSummary.feature @@ -0,0 +1,47 @@ +Feature: MeshService summary + + Background: + Given the CSS selectors + | Alias | Selector | + | summary | [data-testid='summary'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | + And the environment + """ + KUMA_SERVICE_COUNT: 1 + """ + + Rule: In a namespaced environment + + Background: + Given the environment + """ + KUMA_ENVIRONMENT: kubernetes + """ + And the URL "/meshes/default/meshservices" responds with + """ + body: + items: + - name: monitor-proxy-0.kuma-demo + labels: + kuma.io/display-name: monitor-proxy-0 + k8s.kuma.io/namespace: kuma-demo + """ + + Scenario Outline: Switching to YAML format and back + When I visit the "" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists + + Examples: + | URL | + | /meshes/default/services/mesh-services/monitor-proxy-0.kuma-demo | diff --git a/packages/kuma-gui/features/zones/zone-cps/egresses/ZoneEgressSummary.feature b/packages/kuma-gui/features/zones/zone-cps/egresses/ZoneEgressSummary.feature index 7f7ea5ee3..200792d82 100644 --- a/packages/kuma-gui/features/zones/zone-cps/egresses/ZoneEgressSummary.feature +++ b/packages/kuma-gui/features/zones/zone-cps/egresses/ZoneEgressSummary.feature @@ -6,6 +6,8 @@ Feature: Zone Egress summary | item | [data-testid='zone-egress-collection'] tbody tr | | summary | [data-testid='summary'] | | close-summary-button | $summary [data-testid='slideout-close-icon'] | + | select-preference | $summary [data-testid='select-input'] | + | structured-view | $summary [data-testid='structured-view'] | And the URL "/zoneegresses/_overview" responds with """ body: @@ -39,3 +41,21 @@ Feature: Zone Egress summary """ When I visit the "/zones/zone-1/egresses/zone-egress-1?page=2&size=50" URL Then the "$summary" element exists + + Scenario: Switching to YAML format and back + Given the environment + """ + KUMA_ZONEEGRESS_COUNT: 1 + """ + When I visit the "/zones/zone-1/egresses/zone-egress-1" URL + Then the "$select-preference" element exists + And the "$structured-view" element exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-yaml'] button" element + Then the URL contains "format=yaml" + And the "[data-testid='k-code-block']" element exists + And the "$structured-view" element doesn't exists + When I click the "$select-preference" element + When I click the "[data-testid='select-item-structured'] button" element + Then the URL contains "format=structured" + And the "$structured-view" element exists diff --git a/packages/kuma-gui/features/zones/zone-cps/ingresses/ZoneIngressSummary.feature b/packages/kuma-gui/features/zones/zone-cps/ingresses/ZoneIngressSummary.feature index 4aad544f0..48abba5f0 100644 --- a/packages/kuma-gui/features/zones/zone-cps/ingresses/ZoneIngressSummary.feature +++ b/packages/kuma-gui/features/zones/zone-cps/ingresses/ZoneIngressSummary.feature @@ -59,5 +59,3 @@ Feature: Zone Ingress summary When I click the "[data-testid='select-item-structured'] button" element Then the URL contains "format=structured" And the "$structured-view" element exists - - diff --git a/packages/kuma-gui/src/app/data-planes/locales/en-us/index.yaml b/packages/kuma-gui/src/app/data-planes/locales/en-us/index.yaml index a178e977a..f8cf8250d 100644 --- a/packages/kuma-gui/src/app/data-planes/locales/en-us/index.yaml +++ b/packages/kuma-gui/src/app/data-planes/locales/en-us/index.yaml @@ -66,7 +66,11 @@ data-planes: about: title: About this Data Plane Proxy gateway: 'Gateway' - config: YAML + config: Configuration + format: Format + formats: + yaml: YAML + structured: Structured inbounds: 'Inbounds' inbound_name: '{service}' port: ':{port}' diff --git a/packages/kuma-gui/src/app/data-planes/views/DataPlanePolicySummaryView.vue b/packages/kuma-gui/src/app/data-planes/views/DataPlanePolicySummaryView.vue index 43699a516..bccbe2b2b 100644 --- a/packages/kuma-gui/src/app/data-planes/views/DataPlanePolicySummaryView.vue +++ b/packages/kuma-gui/src/app/data-planes/views/DataPlanePolicySummaryView.vue @@ -8,6 +8,7 @@ codeSearch: '', codeFilter: false, codeRegExp: false, + format: 'structured', }" v-slot="{ route, t }" > @@ -41,7 +42,38 @@ + + @@ -53,191 +54,222 @@ - -
- +
+ - - - - + {{ t(`data-planes.routes.item.formats.${value}`) }} + + +
+
+ + - + +
- - - - + + - - + + - - - - - - - - - -
+ - -

{{ t('data-planes.routes.item.gateway') }}

+ +
-
+ + + +
- - - -

- {{ t('data-planes.routes.item.config') }} -

+ +

{{ t('data-planes.routes.item.gateway') }}

+ +
+ + + + + + + + + + + +
+
+
+ - + - - - + + + + + diff --git a/packages/kuma-gui/src/app/gateways/locales/en-us/index.yaml b/packages/kuma-gui/src/app/gateways/locales/en-us/index.yaml index 73907ce43..a9e5ee476 100644 --- a/packages/kuma-gui/src/app/gateways/locales/en-us/index.yaml +++ b/packages/kuma-gui/src/app/gateways/locales/en-us/index.yaml @@ -15,7 +15,11 @@ gateways: A Delegated Gateway allows the integration of existing API gateway solutions into the mesh by adding an Envoy sidecar proxy to an existing Gateway. It then manages the traffic between the services inside the mesh and external clients (North/South). item: namespace: Namespace - config: YAML + config: Configuration + format: Format + formats: + yaml: YAML + structured: Structured builtin-gateways: routes: diff --git a/packages/kuma-gui/src/app/gateways/views/BuiltinGatewaySummaryView.vue b/packages/kuma-gui/src/app/gateways/views/BuiltinGatewaySummaryView.vue index 9cd519a0d..c9be20ec3 100644 --- a/packages/kuma-gui/src/app/gateways/views/BuiltinGatewaySummaryView.vue +++ b/packages/kuma-gui/src/app/gateways/views/BuiltinGatewaySummaryView.vue @@ -7,6 +7,7 @@ codeSearch: '', codeFilter: false, codeRegExp: false, + format: 'structured', }" v-slot="{ route, t }" > @@ -52,53 +53,81 @@ + +
+ +

+ {{ t('gateways.routes.item.config') }} +

+
+ + + +
+
+
-
- - - - - -
-
-

- {{ t('gateways.routes.item.config') }} -

- -
- +
- - -
-
+ + + + + +
+ + +
diff --git a/packages/kuma-gui/src/app/hostname-generators/locales/en-us/index.yaml b/packages/kuma-gui/src/app/hostname-generators/locales/en-us/index.yaml index dbe6f239e..3034547e6 100644 --- a/packages/kuma-gui/src/app/hostname-generators/locales/en-us/index.yaml +++ b/packages/kuma-gui/src/app/hostname-generators/locales/en-us/index.yaml @@ -18,7 +18,11 @@ hostname-generators: title: "{name}" subtitle: "{name} HostnameGenerator" breadcrumbs: Hostname Generators - config: YAML + config: Configuration + format: Format + formats: + yaml: YAML + structured: Structured about: title: About this Hostname Generator items: diff --git a/packages/kuma-gui/src/app/hostname-generators/views/HostnameGeneratorSummaryView.vue b/packages/kuma-gui/src/app/hostname-generators/views/HostnameGeneratorSummaryView.vue index ca7cf853e..dc7be07e9 100644 --- a/packages/kuma-gui/src/app/hostname-generators/views/HostnameGeneratorSummaryView.vue +++ b/packages/kuma-gui/src/app/hostname-generators/views/HostnameGeneratorSummaryView.vue @@ -6,6 +6,7 @@ codeSearch: '', codeFilter: false, codeRegExp: false, + format: 'structured', }" v-slot="{ route, t, can }" > @@ -35,73 +36,99 @@ -
-
- + - - - - - - - - - + {{ t(`hostname-generators.routes.item.formats.${value}`) }} + + +
+ + + + + diff --git a/packages/kuma-gui/src/app/policies/components/PolicySummary.vue b/packages/kuma-gui/src/app/policies/components/PolicySummary.vue index ce42e3eac..eeb4d46a4 100644 --- a/packages/kuma-gui/src/app/policies/components/PolicySummary.vue +++ b/packages/kuma-gui/src/app/policies/components/PolicySummary.vue @@ -1,13 +1,13 @@ + + diff --git a/packages/kuma-gui/src/app/policies/locales/en-us/index.yaml b/packages/kuma-gui/src/app/policies/locales/en-us/index.yaml index 5a72a9c31..82531eb5c 100644 --- a/packages/kuma-gui/src/app/policies/locales/en-us/index.yaml +++ b/packages/kuma-gui/src/app/policies/locales/en-us/index.yaml @@ -7,8 +7,11 @@ policies: item: title: "{name}" breadcrumbs: Policies - overview: 'Overview' - config: 'YAML' + config: 'Configuration' + format: Format + formats: + yaml: YAML + structured: Structured navigation: policy-detail-view: Overview policy-detail-config-view: YAML diff --git a/packages/kuma-gui/src/app/policies/views/PolicySummaryView.vue b/packages/kuma-gui/src/app/policies/views/PolicySummaryView.vue index 4bc5a5f76..042564d08 100644 --- a/packages/kuma-gui/src/app/policies/views/PolicySummaryView.vue +++ b/packages/kuma-gui/src/app/policies/views/PolicySummaryView.vue @@ -8,6 +8,7 @@ codeSearch: '', codeFilter: false, codeRegExp: false, + format: 'structured', }" v-slot="{ route, t }" > @@ -58,7 +59,38 @@ + + @@ -37,87 +38,113 @@ -
-
- + - - - - - - - - - + {{ t(`services.routes.item.formats.${value}`) }} + + +
+ + + + + + + + + + + + + + + + + +
+ + + diff --git a/packages/kuma-gui/src/app/services/views/MeshMultiZoneServiceSummaryView.vue b/packages/kuma-gui/src/app/services/views/MeshMultiZoneServiceSummaryView.vue index 9412cb5d8..039b7a185 100644 --- a/packages/kuma-gui/src/app/services/views/MeshMultiZoneServiceSummaryView.vue +++ b/packages/kuma-gui/src/app/services/views/MeshMultiZoneServiceSummaryView.vue @@ -7,6 +7,7 @@ codeSearch: '', codeFilter: false, codeRegExp: false, + format: 'structured', }" v-slot="{ route, t }" > @@ -37,69 +38,95 @@ -
-
- + - - - - + {{ t(`services.routes.item.formats.${value}`) }} + + +
+ + + + - -
-
-

- {{ t('services.routes.item.config') }} -

- + + {{ key }}:{{ value }} + + + + +
+ + + diff --git a/packages/kuma-gui/src/app/services/views/MeshServiceSummaryView.vue b/packages/kuma-gui/src/app/services/views/MeshServiceSummaryView.vue index b60d52d9a..36388d30c 100644 --- a/packages/kuma-gui/src/app/services/views/MeshServiceSummaryView.vue +++ b/packages/kuma-gui/src/app/services/views/MeshServiceSummaryView.vue @@ -7,6 +7,7 @@ codeSearch: '', codeFilter: false, codeRegExp: false, + format: 'structured', }" v-slot="{ route, t, can }" > @@ -39,138 +40,164 @@ -
-
- + - - - - - - - - - - - - + {{ t(`services.routes.item.formats.${value}`) }} + + +
+ + + - - - - + + + - - - - - - - - + + - - + - -
-
-

- {{ t('services.routes.item.config') }} -

- + + + + + + + + +
+ + + diff --git a/packages/kuma-gui/src/app/subscriptions/locales/en-us/index.yaml b/packages/kuma-gui/src/app/subscriptions/locales/en-us/index.yaml index 06808bd9f..19aae6495 100644 --- a/packages/kuma-gui/src/app/subscriptions/locales/en-us/index.yaml +++ b/packages/kuma-gui/src/app/subscriptions/locales/en-us/index.yaml @@ -1,6 +1,11 @@ subscriptions: routes: item: + config: Configuration + format: Format + formats: + yaml: YAML + structured: Structured navigation: zone-cp-subscription-summary-overview-view: Overview zone-cp-subscription-summary-config-view: YAML diff --git a/packages/kuma-gui/src/app/subscriptions/routes.ts b/packages/kuma-gui/src/app/subscriptions/routes.ts index fd24ae2eb..abe00414e 100644 --- a/packages/kuma-gui/src/app/subscriptions/routes.ts +++ b/packages/kuma-gui/src/app/subscriptions/routes.ts @@ -4,20 +4,7 @@ export const routes = (prefix: string): RouteRecordRaw[] => { { path: 'subscription/:subscription', name: `${prefix}-subscription-summary-view`, - redirect: { name: `${prefix}-subscription-summary-overview-view` }, component: () => import('@/app/subscriptions/views/SubscriptionSummaryView.vue'), - children: [ - { - path: 'overview', - name: `${prefix}-subscription-summary-overview-view`, - component: () => import('@/app/subscriptions/views/SubscriptionSummaryOverviewView.vue'), - }, - { - path: 'config', - name: `${prefix}-subscription-summary-config-view`, - component: () => import('@/app/subscriptions/views/SubscriptionSummaryConfigView.vue'), - }, - ], }, ] } diff --git a/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryConfigView.vue b/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryConfigView.vue deleted file mode 100644 index 8a21d563c..000000000 --- a/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryConfigView.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryOverviewView.vue b/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryOverviewView.vue deleted file mode 100644 index ca664b74c..000000000 --- a/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryOverviewView.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - diff --git a/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryView.vue b/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryView.vue index ad0c584d4..0ad338a7a 100644 --- a/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryView.vue +++ b/packages/kuma-gui/src/app/subscriptions/views/SubscriptionSummaryView.vue @@ -3,6 +3,10 @@ :name="props.routeName" :params="{ subscription: '', + codeSearch: '', + codeFilter: false, + codeRegExp: false, + format: 'structured', }" v-slot="{ route, t }" > @@ -19,34 +23,190 @@ {{ item.zoneInstanceId ?? item.globalInstanceId ?? item.controlPlaneInstanceId }} - - @@ -54,7 +214,11 @@