From c4cda307e504874ee13678d22191ad433ce21485 Mon Sep 17 00:00:00 2001 From: wanglz Date: Tue, 23 Jan 2024 17:18:32 +0800 Subject: [PATCH] [INLONG-9610][Dashboard] Cluster creation type optimization --- .../plugins/clusters/common/ClusterDefaultInfo.ts | 2 +- .../src/plugins/sources/defaults/Pulsar.ts | 12 ++++++------ .../src/ui/pages/Clusters/CreateModal.tsx | 7 ++++++- .../src/ui/pages/GroupDetail/Audit/index.tsx | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts b/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts index cb51484dd8d..e8be5de31bd 100644 --- a/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts +++ b/inlong-dashboard/src/plugins/clusters/common/ClusterDefaultInfo.ts @@ -52,7 +52,7 @@ export class ClusterDefaultInfo implements DataWithBackend, RenderRow, RenderLis props: values => ({ disabled: Boolean(values.id), options: clusters - .filter(item => item.value !== 'AGENT' && item.value !== 'DATAPROXY') + .filter(item => item.value !== 'DATAPROXY') .map(item => ({ label: item.label, value: item.value, diff --git a/inlong-dashboard/src/plugins/sources/defaults/Pulsar.ts b/inlong-dashboard/src/plugins/sources/defaults/Pulsar.ts index 3d8aabe3541..e682002d887 100644 --- a/inlong-dashboard/src/plugins/sources/defaults/Pulsar.ts +++ b/inlong-dashboard/src/plugins/sources/defaults/Pulsar.ts @@ -64,8 +64,8 @@ export default class PulsarSource }) @SyncField() @IngestionField() - @I18n('Admin url') - adminUrl: string; + @I18n('Pulsar topic') + topic: string; @FieldDecorator({ type: 'input', @@ -76,8 +76,8 @@ export default class PulsarSource }) @SyncField() @IngestionField() - @I18n('Service url') - serviceUrl: string; + @I18n('Admin url') + adminUrl: string; @FieldDecorator({ type: 'input', @@ -88,8 +88,8 @@ export default class PulsarSource }) @SyncField() @IngestionField() - @I18n('Pulsar topic') - topic: string; + @I18n('Service url') + serviceUrl: string; @FieldDecorator({ type: 'radio', diff --git a/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx b/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx index 63fd1530c6a..35b5b3641db 100644 --- a/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx +++ b/inlong-dashboard/src/ui/pages/Clusters/CreateModal.tsx @@ -65,7 +65,12 @@ const Comp: React.FC = ({ id, defaultType, ...modalProps }) => { inCharges: values.inCharges?.join(','), clusterTags: values.clusterTags?.join(','), }; - if (values.type === 'SORT_CLS' || values.type === 'SORT_ES' || values.type === 'SORT_PULSAR') { + if ( + values.type === 'AGENT' || + values.type === 'SORT_CLS' || + values.type === 'SORT_ES' || + values.type === 'SORT_PULSAR' + ) { submitData.name = values.displayName; } if (isUpdate) { diff --git a/inlong-dashboard/src/ui/pages/GroupDetail/Audit/index.tsx b/inlong-dashboard/src/ui/pages/GroupDetail/Audit/index.tsx index 3b368c03ad1..6a9525905cc 100644 --- a/inlong-dashboard/src/ui/pages/GroupDetail/Audit/index.tsx +++ b/inlong-dashboard/src/ui/pages/GroupDetail/Audit/index.tsx @@ -121,7 +121,7 @@ const Comp: React.FC = ({ inlongGroupId }) => { }) } /> - +