You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by le...@apache.org on 2022/04/13 04:25:02 UTC
[incubator-inlong] branch master updated: [INLONG-3660][Dashboard] Change visible for dataType and dataSeparator (#3661)
This is an automated email from the ASF dual-hosted git repository.
leezng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 7af891ad7 [INLONG-3660][Dashboard] Change visible for dataType and dataSeparator (#3661)
7af891ad7 is described below
commit 7af891ad7e43c44436a374b7d6da1186847d78db
Author: healchow <he...@gmail.com>
AuthorDate: Wed Apr 13 12:24:56 2022 +0800
[INLONG-3660][Dashboard] Change visible for dataType and dataSeparator (#3661)
---
.../AccessHelper/FieldsConfig/dataFields.tsx | 33 +++++++++++++++------
.../src/components/MetaData/DataSourcesFile.ts | 34 ++--------------------
.../src/components/MetaData/StorageClickhouse.tsx | 1 -
3 files changed, 26 insertions(+), 42 deletions(-)
diff --git a/inlong-dashboard/src/components/AccessHelper/FieldsConfig/dataFields.tsx b/inlong-dashboard/src/components/AccessHelper/FieldsConfig/dataFields.tsx
index 77a4b980b..e238b644b 100644
--- a/inlong-dashboard/src/components/AccessHelper/FieldsConfig/dataFields.tsx
+++ b/inlong-dashboard/src/components/AccessHelper/FieldsConfig/dataFields.tsx
@@ -156,13 +156,26 @@ export default (
label: 'TEXT',
value: 'TEXT',
},
+ {
+ label: 'CSV',
+ value: 'CSV',
+ },
{
label: 'KEY-VALUE',
value: 'KEY-VALUE',
},
+ {
+ label: 'JSON',
+ value: 'JSON',
+ },
+ {
+ label: 'AVRO',
+ value: 'AVRO',
+ },
],
},
rules: [{ required: true }],
+ visible: values => values.dataSourceType !== 'BINLOG',
},
{
type: 'radio',
@@ -192,6 +205,10 @@ export default (
props: {
dropdownMatchSelectWidth: false,
options: [
+ {
+ label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.Space'),
+ value: '32',
+ },
{
label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.VerticalLine'),
value: '124',
@@ -201,20 +218,16 @@ export default (
value: '44',
},
{
- label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.DoubleQuotes'),
- value: '34',
+ label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.Semicolon'),
+ value: '59',
},
{
label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.Asterisk'),
value: '42',
},
{
- label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.Space'),
- value: '32',
- },
- {
- label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.Semicolon'),
- value: '59',
+ label: i18n.t('components.AccessHelper.FieldsConfig.dataFields.DoubleQuotes'),
+ value: '34',
},
],
useInput: true,
@@ -232,7 +245,9 @@ export default (
max: 127,
},
],
- visible: values => values.dataSourceType === 'FILE' || values.dataSourceType === 'AUTO_PUSH',
+ visible: values =>
+ (values.dataSourceType === 'FILE' || values.dataSourceType === 'AUTO_PUSH') &&
+ (values.dataType === 'TEXT' || values.dataType === 'CSV'),
},
{
type: (
diff --git a/inlong-dashboard/src/components/MetaData/DataSourcesFile.ts b/inlong-dashboard/src/components/MetaData/DataSourcesFile.ts
index 0ff834405..7e11cb4be 100644
--- a/inlong-dashboard/src/components/MetaData/DataSourcesFile.ts
+++ b/inlong-dashboard/src/components/MetaData/DataSourcesFile.ts
@@ -37,35 +37,7 @@ export const getDataSourcesFileFields = (
message: i18n.t('components.AccessHelper.DataSourceMetaData.File.IpRule'),
},
],
- _inTable: {
- width: 150,
- },
- },
- {
- name: 'serializationType',
- type: 'radio',
- label: i18n.t('components.AccessHelper.DataSourceMetaData.File.SerializationType'),
- initialValue: 'CSV',
- rules: [{ required: true }],
- props: {
- options: [
- {
- label: 'CSV',
- value: 'CSV',
- },
- {
- label: 'JSON',
- value: 'JSON',
- },
- {
- label: 'AVRO',
- value: 'AVRO',
- },
- ],
- },
- _inTable: {
- width: 100,
- },
+ _inTable: true,
},
{
type: 'input',
@@ -80,9 +52,7 @@ export const getDataSourcesFileFields = (
label: i18n.t('components.AccessHelper.DataSourceMetaData.File.TimeOffset'),
name: 'timeOffset',
tooltip: i18n.t('components.AccessHelper.DataSourceMetaData.File.TimeOffsetHelp'),
- _inTable: {
- width: 100,
- },
+ _inTable: true,
},
];
diff --git a/inlong-dashboard/src/components/MetaData/StorageClickhouse.tsx b/inlong-dashboard/src/components/MetaData/StorageClickhouse.tsx
index 735d44b49..3505c78ff 100644
--- a/inlong-dashboard/src/components/MetaData/StorageClickhouse.tsx
+++ b/inlong-dashboard/src/components/MetaData/StorageClickhouse.tsx
@@ -27,7 +27,6 @@ import { ColumnsType } from 'antd/es/table';
import EditableTable from '@/components/EditableTable';
import { excludeObject } from '@/utils';
import { sourceDataFields } from './SourceDataFields';
-import React from 'react';
// ClickHouse targetType
const clickhouseTargetTypes = [