From c27192755eb87b6f83304f399d736e95da67ae11 Mon Sep 17 00:00:00 2001 From: schogges Date: Fri, 6 Dec 2024 10:35:26 +0100 Subject: [PATCH] refactor(dataplane-summary-view): remove tab navigation Signed-off-by: schogges --- .../mesh/dataplanes/DataplaneSummary.feature | 9 - .../app/data-planes/locales/en-us/index.yaml | 1 + .../kuma-gui/src/app/data-planes/routes.ts | 19 -- .../views/DataPlaneSummaryOverviewView.vue | 83 ------- .../views/DataPlaneSummaryView.vue | 231 ++++++++++++++++-- 5 files changed, 206 insertions(+), 137 deletions(-) diff --git a/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature b/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature index c7441ce1f..08df8a662 100644 --- a/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature +++ b/packages/kuma-gui/features/mesh/dataplanes/DataplaneSummary.feature @@ -47,12 +47,3 @@ 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: Summary URL offers tabs - When I visit the "/meshes/default/data-planes/test-data-plane-1?page=2&size=50" URL - Then the URL contains "/summary-overview" - And the "[data-testid='data-plane-summary-overview-view']" element exists - Then I click the "[data-testid='data-plane-summary-config-view-tab'] a" element - Then the URL contains "/summary-config" - And the "[data-testid='data-plane-summary-config-view']" element exists - And the "[data-testid='k-code-block']" 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 a7f18d14e..c1ec3d4aa 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 @@ -50,6 +50,7 @@ data-planes: delegated-gateway-data-plane-summary-overview-view: Overview delegated-gateway-data-plane-summary-config-view: YAML gateway: 'Gateway' + config: YAML inbounds: 'Inbounds' inbound_name: '{service}' port: ':{port}' diff --git a/packages/kuma-gui/src/app/data-planes/routes.ts b/packages/kuma-gui/src/app/data-planes/routes.ts index 6f5ab29d1..2a4719f8d 100644 --- a/packages/kuma-gui/src/app/data-planes/routes.ts +++ b/packages/kuma-gui/src/app/data-planes/routes.ts @@ -66,26 +66,7 @@ export const routes = () => { props: () => ({ routeName: `${fullPrefix}data-plane-summary-view`, }), - redirect: { name: `${fullPrefix}data-plane-summary-overview-view` }, component: () => import('@/app/data-planes/views/DataPlaneSummaryView.vue'), - children: [ - { - path: 'summary-overview', - name: `${fullPrefix}data-plane-summary-overview-view`, - props: () => ({ - routeName: `${fullPrefix}data-plane-summary-overview-view`, - }), - component: () => import('@/app/data-planes/views/DataPlaneSummaryOverviewView.vue'), - }, - { - path: 'summary-config', - name: `${fullPrefix}data-plane-summary-config-view`, - props: () => ({ - routeName: `${fullPrefix}data-plane-summary-config-view`, - }), - component: () => import('@/app/data-planes/views/DataPlaneSummaryConfigView.vue'), - }, - ], }, ] } diff --git a/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryOverviewView.vue b/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryOverviewView.vue index ce60a1b70..2b1a4c021 100644 --- a/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryOverviewView.vue +++ b/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryOverviewView.vue @@ -161,89 +161,6 @@ - - -
-

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

- -
-
-

- - {{ t('data-planes.routes.item.inbound_name', { service: inbound.tags['kuma.io/service'] }) }} - -

- -
- - - - - - - - - - - - - - - - - -
-
-
-
-
diff --git a/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryView.vue b/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryView.vue index e54396407..807f9fc66 100644 --- a/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryView.vue +++ b/packages/kuma-gui/src/app/data-planes/views/DataPlaneSummaryView.vue @@ -2,9 +2,13 @@ - - - - - - + {{ t('http.api.property.status') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - +

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

+ +
+
+ + + + + + + + + + + +
+
+
+ + +
+

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

+ +
+ + + +
+
@@ -84,7 +251,19 @@