This is an automated email from the ASF dual-hosted git repository. mintsweet pushed a commit to branch feat-6247 in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit b1f9e59b6c62ca3e0e4cb41f6456046720a621e3 Author: mintsweet <[email protected]> AuthorDate: Tue Nov 21 16:28:14 2023 +1300 refactor(config-ui): adjust the connection interface --- config-ui/src/features/connections/utils.ts | 2 -- .../blueprint/detail/components/add-connection-dialog/index.tsx | 2 +- config-ui/src/pages/blueprint/detail/configuration-panel.tsx | 2 +- config-ui/src/pages/connection/detail/index.tsx | 6 +++--- config-ui/src/pages/connection/home/index.tsx | 8 ++++---- config-ui/src/routes/pipeline/components/task.tsx | 4 ++-- config-ui/src/types/connection.ts | 2 -- 7 files changed, 11 insertions(+), 15 deletions(-) diff --git a/config-ui/src/features/connections/utils.ts b/config-ui/src/features/connections/utils.ts index 320c936a3..a7d3a584c 100644 --- a/config-ui/src/features/connections/utils.ts +++ b/config-ui/src/features/connections/utils.ts @@ -29,8 +29,6 @@ export const transformConnection = (plugin: string, connection: IConnectionAPI): id: connection.id, name: connection.name, status: IConnectionStatus.IDLE, - icon: config.icon, - isBeta: config.isBeta ?? false, endpoint: connection.endpoint, proxy: connection.proxy, authMethod: connection.authMethod, diff --git a/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx b/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx index 6ef875322..cc882ab97 100644 --- a/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx +++ b/config-ui/src/pages/blueprint/detail/components/add-connection-dialog/index.tsx @@ -64,7 +64,7 @@ export const AddConnectionDialog = ({ disabled = [], onCancel, onSubmit }: Props disabledItems={disabledItems} getKey={(it) => it.unique} getName={(it) => it.name} - getIcon={(it) => it.icon} + // getIcon={(it) => it.icon} selectedItem={selectedConnection} onChangeItem={(selectedItem) => setSelectedConnection(selectedItem)} /> diff --git a/config-ui/src/pages/blueprint/detail/configuration-panel.tsx b/config-ui/src/pages/blueprint/detail/configuration-panel.tsx index d7f3a755e..5682f3eac 100644 --- a/config-ui/src/pages/blueprint/detail/configuration-panel.tsx +++ b/config-ui/src/pages/blueprint/detail/configuration-panel.tsx @@ -208,7 +208,7 @@ export const ConfigurationPanel = ({ from, blueprint, onRefresh, onChangeTab }: {connections.map((cs) => ( <S.ConnectionItem key={`${cs.plugin}-${cs.connectionId}`}> <div className="title"> - <img src={cs.icon} alt="" /> + {/* <img src={cs.icon} alt="" /> */} <ConnectionName plugin={cs.plugin} connectionId={cs.connectionId} /> </div> <div className="count"> diff --git a/config-ui/src/pages/connection/detail/index.tsx b/config-ui/src/pages/connection/detail/index.tsx index 3a25e18ec..e96370d04 100644 --- a/config-ui/src/pages/connection/detail/index.tsx +++ b/config-ui/src/pages/connection/detail/index.tsx @@ -75,7 +75,7 @@ export const ConnectionDetailPage = () => { [version, page, pageSize], ); - const { name, icon } = connection; + const { name } = connection; const pluginConfig = useMemo(() => getPluginConfig(plugin), [plugin]); @@ -372,7 +372,7 @@ export const ConnectionDetailPage = () => { footer={null} title={ <S.DialogTitle> - <img src={icon} alt="" /> + {/* <img src={icon} alt="" /> */} <span>Authentication</span> </S.DialogTitle> } @@ -388,7 +388,7 @@ export const ConnectionDetailPage = () => { footer={null} title={ <S.DialogTitle> - <img src={icon} alt="" /> + {/* <img src={icon} alt="" /> */} <span>Add Data Scope: {name}</span> </S.DialogTitle> } diff --git a/config-ui/src/pages/connection/home/index.tsx b/config-ui/src/pages/connection/home/index.tsx index fbd3e7c58..75d18ccfd 100644 --- a/config-ui/src/pages/connection/home/index.tsx +++ b/config-ui/src/pages/connection/home/index.tsx @@ -80,7 +80,7 @@ export const ConnectionHomePage = () => { const connectionCount = connections.filter((cs) => cs.plugin === plugin).length; return ( <li key={plugin} onClick={() => handleShowListDialog(plugin)}> - <img src={pluginConfig.icon} alt="" /> + {/* <img src={pluginConfig.icon} alt="" /> */} <span className="name">{pluginConfig.name}</span> <S.Count>{connectionCount ? `${connectionCount} connections` : 'No connection'}</S.Count> {pluginConfig.isBeta && ( @@ -109,7 +109,7 @@ export const ConnectionHomePage = () => { const connectionCount = webhooks.length; return ( <li key={plugin} onClick={() => handleShowListDialog(plugin)}> - <img src={pluginConfig.icon} alt="" /> + {/* <img src={pluginConfig.icon} alt="" /> */} <span className="name">{pluginConfig.name}</span> <S.Count>{connectionCount ? `${connectionCount} connections` : 'No connection'}</S.Count> </li> @@ -124,7 +124,7 @@ export const ConnectionHomePage = () => { isOpen title={ <S.DialogTitle> - <img src={pluginConfig.icon} alt="" /> + {/* <img src={pluginConfig.icon} alt="" /> */} <span>Manage Connections: {pluginConfig.name}</span> </S.DialogTitle> } @@ -140,7 +140,7 @@ export const ConnectionHomePage = () => { isOpen title={ <S.DialogTitle> - <img src={pluginConfig.icon} alt="" /> + {/* <img src={pluginConfig.icon} alt="" /> */} <span>Manage Connections: {pluginConfig.name}</span> </S.DialogTitle> } diff --git a/config-ui/src/routes/pipeline/components/task.tsx b/config-ui/src/routes/pipeline/components/task.tsx index 616debaca..b8e6dce06 100644 --- a/config-ui/src/routes/pipeline/components/task.tsx +++ b/config-ui/src/routes/pipeline/components/task.tsx @@ -38,7 +38,7 @@ export const PipelineTask = ({ task }: Props) => { const { id, beganAt, finishedAt, status, message, progressDetail } = task; - const [icon, name] = useMemo(() => { + const [, name] = useMemo(() => { const config = getPluginConfig(task.plugin); const options = task.options; @@ -101,7 +101,7 @@ export const PipelineTask = ({ task }: Props) => { <S.Task> <div className="info"> <div className="title"> - <img src={icon} alt="" /> + {/* <img src={icon} alt="" /> */} <strong>Task{id}</strong> <span> <TextTooltip content={name}>{name}</TextTooltip> diff --git a/config-ui/src/types/connection.ts b/config-ui/src/types/connection.ts index 48dc057c1..12fcc5bad 100644 --- a/config-ui/src/types/connection.ts +++ b/config-ui/src/types/connection.ts @@ -60,8 +60,6 @@ export interface IConnection { id: ID; name: string; status: IConnectionStatus; - icon: string; - isBeta: boolean; endpoint: string; proxy: string; authMethod?: string;
