From 41a308c5f88b10ec8e6ec582c8e6fb90922199fd Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Tue, 10 Oct 2023 13:39:54 +0800 Subject: [PATCH] fix(*): style, test and text (#103) --- src/components/KonnectCTA.vue | 3 +-- src/pages/overview/Overview.vue | 16 ++++++++++++---- src/stores/types.ts | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/components/KonnectCTA.vue b/src/components/KonnectCTA.vue index 3157f8f3..afbdc1d5 100644 --- a/src/components/KonnectCTA.vue +++ b/src/components/KonnectCTA.vue @@ -102,6 +102,7 @@ const link = 'https://konghq.com/products/kong-konnect/register?utm_medium=produ .konnect-container { display: flex; justify-content: space-between; + overflow: auto; .konnect-content { flex-shrink: 0; @@ -175,8 +176,6 @@ const link = 'https://konghq.com/products/kong-konnect/register?utm_medium=produ } .konnect-preview { - overflow: hidden; - .konnect-preview-screenshot { width: 570px; } diff --git a/src/pages/overview/Overview.vue b/src/pages/overview/Overview.vue index b201798d..e7b3392a 100644 --- a/src/pages/overview/Overview.vue +++ b/src/pages/overview/Overview.vue @@ -80,6 +80,13 @@ const config = computed(() => ({ })) const version = computed(() => gatewayConfig.GATEWAY_VERSION ? `${formatVersion(gatewayConfig.GATEWAY_VERSION)}.x` : 'latest') const info = computed(() => { + const guiListeners = config.value.admin_gui_listeners + const nonSslGuiListener = guiListeners?.find?.(listener => !listener.ssl) + const sslGuiListener = guiListeners?.find?.(listener => listener.ssl) + const proxyListeners = config.value.proxy_listeners + const nonSslProxyListener = proxyListeners?.find?.(listener => !listener.ssl) + const sslProxyListener = proxyListeners?.find?.(listener => listener.ssl) + return [ { title: t('overview.info.gateway.title'), @@ -112,19 +119,19 @@ const info = computed(() => { items: [ { label: t('overview.info.port.port'), - value: config.value.admin_gui_listeners?.[0]?.port ?? '--', + value: nonSslGuiListener?.port ?? '--', }, { label: t('overview.info.port.ssl'), - value: config.value.admin_gui_listeners?.[1]?.port ?? '--', + value: sslGuiListener?.port ?? '--', }, { label: t('overview.info.port.proxy'), - value: config.value.proxy_listeners?.[0]?.port ?? '--', + value: nonSslProxyListener?.port ?? '--', }, { label: t('overview.info.port.proxy.ssl'), - value: config.value.proxy_listeners?.[1]?.port ?? '--', + value: sslProxyListener?.port ?? '--', }, ], }, @@ -251,6 +258,7 @@ $card-spacing: 32px; padding: 16px $kui-space-80; text-decoration: none; color: inherit; + height: 100%; &:hover { background-color: $kui-color-background-primary-weakest; diff --git a/src/stores/types.ts b/src/stores/types.ts index 6059c866..1d911da0 100644 --- a/src/stores/types.ts +++ b/src/stores/types.ts @@ -12,8 +12,8 @@ export interface Info { } role?: 'traditional' | 'control_plane' | 'data_plane' admin_listen?: string[] - admin_gui_listeners?: Array<{ port: number }> - proxy_listeners?: Array<{ port: number }> + admin_gui_listeners?: Array<{ port: number, ssl?: boolean }> + proxy_listeners?: Array<{ port: number, ssl?: boolean }> pg_user?: string pg_host?: string pg_port?: number