This is an automated email from the ASF dual-hosted git repository.
likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 2a6cdb318 fix(config-ui): no transformation cannot be set (#5115)
2a6cdb318 is described below
commit 2a6cdb318c491018854b027a63cf9d88000ef5ce
Author: 青湛 <[email protected]>
AuthorDate: Mon May 8 10:07:35 2023 +0800
fix(config-ui): no transformation cannot be set (#5115)
---
.../plugins/components/transformation/index.tsx | 37 ++++++++++++----------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/config-ui/src/plugins/components/transformation/index.tsx
b/config-ui/src/plugins/components/transformation/index.tsx
index 570a1f49d..ebf6bda7e 100644
--- a/config-ui/src/plugins/components/transformation/index.tsx
+++ b/config-ui/src/plugins/components/transformation/index.tsx
@@ -123,23 +123,26 @@ export const Transformation = ({
dataIndex: 'transformationRuleName',
key: 'transformation',
align: 'center',
- render: (val, row) => (
- <div>
- <span>{val ?? 'N/A'}</span>
- <IconButton
- icon="one-to-one"
- tooltip="Associate Transformation"
- onClick={() => {
- setSelected({
- ...selected,
- [`${cs.unique}`]: [row[getPluginId(cs.plugin)]],
- });
- setConnection(cs);
- setTid(row.transformationRuleId);
- }}
- />
- </div>
- ),
+ render: (val, row) =>
+ cs.transformationType === 'none' ? (
+ 'N/A'
+ ) : (
+ <div>
+ <span>{val ?? 'N/A'}</span>
+ <IconButton
+ icon="one-to-one"
+ tooltip="Associate Transformation"
+ onClick={() => {
+ setSelected({
+ ...selected,
+ [`${cs.unique}`]: [row[getPluginId(cs.plugin)]],
+ });
+ setConnection(cs);
+ setTid(row.transformationRuleId);
+ }}
+ />
+ </div>
+ ),
},
]}
dataSource={cs.origin}