This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 3c6587fe5 [INLONG-7915][Dashboard] Clickhouse sink engine field
optimization (#7916)
3c6587fe5 is described below
commit 3c6587fe510e72e42abede08f6198ecd68065bf4
Author: Lizhen <[email protected]>
AuthorDate: Tue Apr 25 16:28:30 2023 +0800
[INLONG-7915][Dashboard] Clickhouse sink engine field optimization (#7916)
---
.../src/plugins/clusters/common/ClusterDefaultInfo.ts | 2 +-
.../src/plugins/nodes/common/NodeDefaultInfo.ts | 2 +-
.../src/plugins/sinks/defaults/ClickHouse.ts | 18 ++++++++++++++++--
.../src/ui/components/NodeSelect/index.tsx | 2 +-
.../src/ui/pages/ProcessDetail/GroupConfig.tsx | 4 +++-
5 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts
b/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts
index 6d40d3e10..50c19d9cf 100644
--- a/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts
+++ b/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts
@@ -44,7 +44,7 @@ export class ClusterDefaultInfo implements DataWithBackend,
RenderRow, RenderLis
})
@ColumnDecorator()
@I18n('pages.Clusters.Name')
- name: string;
+ displayName: string;
@FieldDecorator({
type: clusters.length > 3 ? 'select' : 'radio',
diff --git a/inlong-dashboard/src/plugins/nodes/common/NodeDefaultInfo.ts
b/inlong-dashboard/src/plugins/nodes/common/NodeDefaultInfo.ts
index 98e8c2de9..fd922b106 100644
--- a/inlong-dashboard/src/plugins/nodes/common/NodeDefaultInfo.ts
+++ b/inlong-dashboard/src/plugins/nodes/common/NodeDefaultInfo.ts
@@ -44,7 +44,7 @@ export class NodeDefaultInfo implements DataWithBackend,
RenderRow, RenderList {
})
@ColumnDecorator()
@I18n('meta.Nodes.Name')
- name: string;
+ displayName: string;
@FieldDecorator({
type: nodes.length > 3 ? 'select' : 'radio',
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts
b/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts
index 2db819c94..4216c4d49 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts
@@ -202,11 +202,25 @@ export default class ClickHouseSink
partitionFields: string;
@FieldDecorator({
- type: 'input',
- initialValue: 'MergeTree',
+ type: 'select',
+ initialValue: 'Log',
rules: [{ required: true }],
props: values => ({
disabled: [110, 130].includes(values?.status),
+ options: [
+ {
+ label: 'Log',
+ value: 'Log',
+ },
+ {
+ label: 'MergeTree',
+ value: 'MergeTree',
+ },
+ {
+ label: 'ReplicatedMergeTree',
+ value: 'ReplicatedMergeTree',
+ },
+ ],
}),
})
@I18n('meta.Sinks.ClickHouse.Engine')
diff --git a/inlong-dashboard/src/ui/components/NodeSelect/index.tsx
b/inlong-dashboard/src/ui/components/NodeSelect/index.tsx
index 9316db586..c766e8040 100644
--- a/inlong-dashboard/src/ui/components/NodeSelect/index.tsx
+++ b/inlong-dashboard/src/ui/components/NodeSelect/index.tsx
@@ -46,7 +46,7 @@ const NodeSelect: React.FC<NodeSelectProps> = _props => {
requestParams: {
formatResult: result =>
result?.list?.map(item => ({
- label: item.name,
+ label: item.displayName,
value: item.name,
})),
},
diff --git a/inlong-dashboard/src/ui/pages/ProcessDetail/GroupConfig.tsx
b/inlong-dashboard/src/ui/pages/ProcessDetail/GroupConfig.tsx
index d106945fb..4e97f2295 100644
--- a/inlong-dashboard/src/ui/pages/ProcessDetail/GroupConfig.tsx
+++ b/inlong-dashboard/src/ui/pages/ProcessDetail/GroupConfig.tsx
@@ -21,6 +21,7 @@ import React, { useMemo } from 'react';
import { Divider, Table } from 'antd';
import i18n from '@/i18n';
import { useLoadMeta, GroupMetaType } from '@/plugins';
+import { sinks } from '@/plugins/sinks';
export const useGroupFormContent = ({ mqType = '', isFinished, isViwer }) => {
const { Entity } = useLoadMeta<GroupMetaType>('group', mqType);
@@ -86,7 +87,8 @@ export const getFormContent = ({
{
title: i18n.t('pages.ApprovalDetail.GroupConfig.DataStorages'),
dataIndex: 'sinkList',
- render: text => text.map(item => item.sinkType).join(','),
+ render: text =>
+ text.map(item => sinks.find(c => c.value ===
item.sinkType)?.label).join(','),
},
]}
dataSource={formData?.streamInfoList || []}