From 4f65bce1e9a82d76b66f5aa5658c21c351d20218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E6=B9=9B?= <0x1304570@gmail.com> Date: Fri, 20 Oct 2023 20:22:32 +1300 Subject: [PATCH] fix(config-ui): some bugs (#6295) * fix(config-ui): missed connections when refreshing connection detail page * fix(config-ui): adjust the spacing for webhook * fix(config-ui): adjust some content about api-keys * fix(config-ui): hidden edit scope config when plugin doesn't have it --- .../blueprint/connection-detail/index.tsx | 15 ++++--- .../src/pages/connection/detail/index.tsx | 13 ++---- .../src/plugins/register/webhook/styled.ts | 2 +- config-ui/src/routes/api-keys/api-keys.tsx | 40 +++++-------------- config-ui/src/routes/api-keys/styled.ts | 10 ----- 5 files changed, 24 insertions(+), 56 deletions(-) diff --git a/config-ui/src/pages/blueprint/connection-detail/index.tsx b/config-ui/src/pages/blueprint/connection-detail/index.tsx index bae6b58f885..bb13c4b0532 100644 --- a/config-ui/src/pages/blueprint/connection-detail/index.tsx +++ b/config-ui/src/pages/blueprint/connection-detail/index.tsx @@ -24,7 +24,7 @@ import { Popover2 } from '@blueprintjs/popover2'; import API from '@/api'; import { PageLoading, PageHeader, ExternalLink, Message, Buttons, Table, Dialog } from '@/components'; import { useRefreshData, useTips } from '@/hooks'; -import { DataScopeSelect, getPluginScopeId } from '@/plugins'; +import { DataScopeSelect, getPluginScopeId, PluginConfig, PluginConfigType } from '@/plugins'; import { operator } from '@/utils'; import { encodeName } from '../../project/utils'; @@ -50,8 +50,11 @@ export const BlueprintConnectionDetailPage = () => { return API.blueprint.get(bid as any); }; + const [plugin, connectionId] = unique.split('-'); + + const pluginConfig = PluginConfig.find((p) => p.plugin === plugin) as PluginConfigType; + const { ready, data } = useRefreshData(async () => { - const [plugin, connectionId] = unique.split('-'); const [blueprint, connection] = await Promise.all([ getBlueprint(pname, bid), API.connection.get(plugin, connectionId), @@ -205,9 +208,11 @@ export const BlueprintConnectionDetailPage = () => {