diff --git a/packages/kuma-gui/features/application/MainNavigation.feature b/packages/kuma-gui/features/application/MainNavigation.feature index 82c37b23b..8e0a84d16 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='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/mesh/dataplanes/overview/summary/Clusters.feature b/packages/kuma-gui/features/mesh/dataplanes/overview/summary/Clusters.feature index 590bc4075..c45e1acf7 100644 --- a/packages/kuma-gui/features/mesh/dataplanes/overview/summary/Clusters.feature +++ b/packages/kuma-gui/features/mesh/dataplanes/overview/summary/Clusters.feature @@ -3,7 +3,7 @@ Feature: mesh / dataplanes / connections / clusters Scenario: The inbound clusters tab correctly filters by 'localhost_' Given the CSS selectors | Alias | Selector | - | code | [data-testid='connection-inbound-summary-clusters-view'] [data-testid='k-code-block'] | + | 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 """ body: @@ -31,7 +31,7 @@ Feature: mesh / dataplanes / connections / clusters Scenario: The outbound clusters tab correctly filters by '' Given the CSS selectors | Alias | Selector | - | code | [data-testid='connection-outbound-summary-clusters-view'] [data-testid='k-code-block'] | + | 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 """ body: | diff --git a/packages/kuma-gui/src/app/connections/routes.ts b/packages/kuma-gui/src/app/connections/routes.ts index ef70bc9f5..9de57067d 100644 --- a/packages/kuma-gui/src/app/connections/routes.ts +++ b/packages/kuma-gui/src/app/connections/routes.ts @@ -1,56 +1,68 @@ import type { RouteRecordRaw } from 'vue-router' -export const routes = (): RouteRecordRaw[] => { + +export const networking = (prefix: string) => { + return [ + { + path: 'xds-config', + name: `${prefix}-xds-config-view`, + component: () => import('@/app/connections/views/ConnectionsXdsConfigView.vue'), + }, + { + path: 'stats', + name: `${prefix}-stats-view`, + component: () => import('@/app/connections/views/ConnectionsStatsView.vue'), + }, + { + path: 'clusters', + name: `${prefix}-clusters-view`, + component: () => import('@/app/connections/views/ConnectionsClustersView.vue'), + }, + + ] +} + +export const routes = (prefix: string): RouteRecordRaw[] => { return [ { path: 'inbound/:connection', - name: 'connection-inbound-summary-view', + name: `${prefix}-connection-inbound-summary-view`, component: () => import('@/app/connections/views/ConnectionInboundSummaryView.vue'), children: [ - { - path: 'overview', - name: 'connection-inbound-summary-overview-view', - component: () => import('@/app/connections/views/ConnectionInboundSummaryOverviewView.vue'), - }, { path: 'stats', - name: 'connection-inbound-summary-stats-view', + name: `${prefix}-connection-inbound-summary-stats-view`, component: () => import('@/app/connections/views/ConnectionInboundSummaryStatsView.vue'), }, { path: 'clusters', - name: 'connection-inbound-summary-clusters-view', + name: `${prefix}-connection-inbound-summary-clusters-view`, component: () => import('@/app/connections/views/ConnectionInboundSummaryClustersView.vue'), }, { path: 'xds-config', - name: 'connection-inbound-summary-xds-config-view', + name: `${prefix}-connection-inbound-summary-xds-config-view`, component: () => import('@/app/connections/views/ConnectionInboundSummaryXdsConfigView.vue'), }, ], }, { path: 'outbound/:connection', - name: 'connection-outbound-summary-view', + name: `${prefix}-connection-outbound-summary-view`, component: () => import('@/app/connections/views/ConnectionOutboundSummaryView.vue'), children: [ - { - path: 'overview', - name: 'connection-outbound-summary-overview-view', - component: () => import('@/app/connections/views/ConnectionOutboundSummaryOverviewView.vue'), - }, { path: 'stats', - name: 'connection-outbound-summary-stats-view', + name: `${prefix}-connection-outbound-summary-stats-view`, component: () => import('@/app/connections/views/ConnectionOutboundSummaryStatsView.vue'), }, { path: 'clusters', - name: 'connection-outbound-summary-clusters-view', + name: `${prefix}-connection-outbound-summary-clusters-view`, component: () => import('@/app/connections/views/ConnectionOutboundSummaryClustersView.vue'), }, { path: 'xds-config', - name: 'connection-outbound-summary-xds-config-view', + name: `${prefix}-connection-outbound-summary-xds-config-view`, component: () => import('@/app/connections/views/ConnectionOutboundSummaryXdsConfigView.vue'), }, ], diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryClustersView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryClustersView.vue index 618184957..edfdf1e30 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryClustersView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryClustersView.vue @@ -8,7 +8,7 @@ dataPlane: '', connection: '', }" - name="connection-inbound-summary-clusters-view" + :name="props.routeName" v-slot="{ route, uri }" > diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryStatsView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryStatsView.vue index f78f330a5..24b0304ab 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryStatsView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryStatsView.vue @@ -8,7 +8,7 @@ dataPlane: '', connection: '', }" - name="connection-inbound-summary-stats-view" + :name="props.routeName" v-slot="{ route, uri }" > @@ -62,10 +62,11 @@ diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryView.vue index 457a55a42..4d7846003 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryView.vue @@ -1,6 +1,6 @@ @@ -47,7 +47,7 @@ @@ -56,10 +56,11 @@ diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryXdsConfigView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryXdsConfigView.vue index 8470f3715..25b967cc5 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryXdsConfigView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionInboundSummaryXdsConfigView.vue @@ -8,7 +8,7 @@ dataPlane: '', connection: '', }" - name="connection-inbound-summary-xds-config-view" + :name="props.routeName" v-slot="{ t, route, uri }" > diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryClustersView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryClustersView.vue index 9ab147d33..227c56cd9 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryClustersView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryClustersView.vue @@ -8,7 +8,7 @@ dataPlane: '', connection: '', }" - name="connection-outbound-summary-clusters-view" + :name="props.routeName" v-slot="{ route, uri }" > diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryStatsView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryStatsView.vue index 99a2e94b4..57461924e 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryStatsView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryStatsView.vue @@ -8,7 +8,7 @@ dataPlane: '', connection: '', }" - name="connection-outbound-summary-stats-view" + :name="props.routeName" v-slot="{ route, uri }" > diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryView.vue index 2d73ed259..f316d22b1 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryView.vue @@ -1,6 +1,6 @@ @@ -43,7 +43,7 @@ @@ -52,9 +52,10 @@ diff --git a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryXdsConfigView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryXdsConfigView.vue index b413d8ddc..fa2841918 100644 --- a/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryXdsConfigView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionOutboundSummaryXdsConfigView.vue @@ -9,7 +9,7 @@ connection: '', includeEds: false, }" - name="connection-outbound-summary-xds-config-view" + :name="props.routeName" v-slot="{ t, route, uri }" > diff --git a/packages/kuma-gui/src/app/data-planes/views/DataPlaneClustersView.vue b/packages/kuma-gui/src/app/connections/views/ConnectionsClustersView.vue similarity index 92% rename from packages/kuma-gui/src/app/data-planes/views/DataPlaneClustersView.vue rename to packages/kuma-gui/src/app/connections/views/ConnectionsClustersView.vue index 8d9470f25..5e4d2da4e 100644 --- a/packages/kuma-gui/src/app/data-planes/views/DataPlaneClustersView.vue +++ b/packages/kuma-gui/src/app/connections/views/ConnectionsClustersView.vue @@ -1,6 +1,6 @@