You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2023/04/27 06:05:37 UTC

[inlong] branch master updated: [INLONG-7929][Dashboard] The select box cannot be triggered when the form is not entered (#7930)

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 a99982934 [INLONG-7929][Dashboard] The select box cannot be triggered when the form is not entered (#7930)
a99982934 is described below

commit a999829346646e31e5ac936dedd2c5c7673a5deb
Author: Lizhen <88...@users.noreply.github.com>
AuthorDate: Thu Apr 27 14:05:31 2023 +0800

    [INLONG-7929][Dashboard] The select box cannot be triggered when the form is not entered (#7930)
    
    Co-authored-by: Charles Zhang <do...@apache.org>
---
 inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts      | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Doris.ts           | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Elasticsearch.ts   | 8 ++++----
 inlong-dashboard/src/plugins/sinks/defaults/Greenplum.ts       | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/HBase.ts           | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Hive.ts            | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Hudi.ts            | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts         | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Kudu.ts            | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/MySQL.ts           | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Oracle.ts          | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/PostgreSQL.ts      | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/Redis.ts           | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/SQLServer.ts       | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/StarRocks.ts       | 2 +-
 inlong-dashboard/src/plugins/sinks/defaults/TDSQLPostgreSQL.ts | 2 +-
 inlong-dashboard/src/ui/locales/cn.json                        | 1 +
 inlong-dashboard/src/ui/locales/en.json                        | 1 +
 18 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts b/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts
index 4216c4d49..8b082ad17 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/ClickHouse.ts
@@ -352,7 +352,7 @@ const getFieldListColumns = sinkValues => {
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
         options: clickHouseTargetTypes,
       }),
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
     },
     {
       title: 'DefaultType',
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Doris.ts b/inlong-dashboard/src/plugins/sinks/defaults/Doris.ts
index 552afcd1e..514934a8a 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Doris.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Doris.ts
@@ -209,7 +209,7 @@ const getFieldListColumns = sinkValues => {
         options: dorisTargetTypes,
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
     },
     {
       title: i18n.t('meta.Sinks.Doris.IsMetaField'),
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Elasticsearch.ts b/inlong-dashboard/src/plugins/sinks/defaults/Elasticsearch.ts
index 60c904e0b..e2a49cfae 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Elasticsearch.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Elasticsearch.ts
@@ -175,7 +175,7 @@ const getFieldListColumns = sinkValues => {
   return [
     ...sourceFields,
     {
-      title: `ES ${i18n.t('meta.Sinks.ES.FieldName')}`,
+      title: `Elasticsearch${i18n.t('meta.Sinks.ES.FieldName')}`,
       dataIndex: 'fieldName',
       rules: [
         { required: true },
@@ -189,7 +189,7 @@ const getFieldListColumns = sinkValues => {
       }),
     },
     {
-      title: `ES ${i18n.t('meta.Sinks.ES.FieldType')}`,
+      title: `Elasticsearch${i18n.t('meta.Sinks.ES.FieldType')}`,
       dataIndex: 'fieldType',
       initialValue: esTypes[0].value,
       type: 'select',
@@ -197,7 +197,7 @@ const getFieldListColumns = sinkValues => {
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
         options: esTypes,
       }),
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
     },
     {
       title: 'Analyzer',
@@ -233,7 +233,7 @@ const getFieldListColumns = sinkValues => {
       visible: (text, record) => record.fieldType === 'scaled_float',
     },
     {
-      title: `ES ${i18n.t('meta.Sinks.ES.FieldDescription')}`,
+      title: i18n.t('meta.Sinks.ES.FieldDescription'),
       dataIndex: 'fieldComment',
       props: (text, record, idx, isNew) => ({
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Greenplum.ts b/inlong-dashboard/src/plugins/sinks/defaults/Greenplum.ts
index c8aced62a..a156585e2 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Greenplum.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Greenplum.ts
@@ -183,7 +183,7 @@ const getFieldListColumns = sinkValues => {
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
       rules: [
-        { required: true },
+        { required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` },
         () => ({
           validator(_, val) {
             if (val) {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/HBase.ts b/inlong-dashboard/src/plugins/sinks/defaults/HBase.ts
index 8c08a50cb..8de96c1f3 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/HBase.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/HBase.ts
@@ -178,7 +178,7 @@ const getFieldListColumns = sinkValues => {
         options: hbaseFieldTypes,
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
     },
     {
       title: 'cfName',
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Hive.ts b/inlong-dashboard/src/plugins/sinks/defaults/Hive.ts
index 80d464b16..004cd7d88 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Hive.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Hive.ts
@@ -320,7 +320,7 @@ const getFieldListColumns = sinkValues => {
         options: hiveFieldTypes,
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
     },
     {
       title: i18n.t('meta.Sinks.Hive.IsMetaField'),
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Hudi.ts b/inlong-dashboard/src/plugins/sinks/defaults/Hudi.ts
index ee8246e7f..b54b7a380 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Hudi.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Hudi.ts
@@ -299,7 +299,7 @@ const getFieldListColumns = sinkValues => {
       width: 130,
       initialValue: hudiFieldTypes[0].value,
       type: 'select',
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
       props: (text, record, idx, isNew) => ({
         options: hudiFieldTypes,
         onChange: value => {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts b/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts
index f27742927..7f23b5b71 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Iceberg.ts
@@ -276,7 +276,7 @@ const getFieldListColumns = sinkValues => {
       width: 130,
       initialValue: icebergFieldTypes[0].value,
       type: 'select',
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
       props: (text, record, idx, isNew) => ({
         options: icebergFieldTypes,
         onChange: value => {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Kudu.ts b/inlong-dashboard/src/plugins/sinks/defaults/Kudu.ts
index a0d080dd4..d895796e1 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Kudu.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Kudu.ts
@@ -217,7 +217,7 @@ const getFieldListColumns = sinkValues => {
       width: 130,
       initialValue: kuduFieldTypes[0].value,
       type: 'select',
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
       props: (text, record, idx, isNew) => ({
         options: kuduFieldTypes,
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/MySQL.ts b/inlong-dashboard/src/plugins/sinks/defaults/MySQL.ts
index 2cb4e1c7c..54780f8bd 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/MySQL.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/MySQL.ts
@@ -170,7 +170,7 @@ const getFieldListColumns = sinkValues => {
         allowClear: true,
       }),
       rules: [
-        { required: true },
+        { required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` },
         () => ({
           validator(_, val) {
             if (val) {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Oracle.ts b/inlong-dashboard/src/plugins/sinks/defaults/Oracle.ts
index 26e8baa3a..bbd08d8ed 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Oracle.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Oracle.ts
@@ -176,7 +176,7 @@ const getFieldListColumns = sinkValues => {
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
       rules: [
-        { required: true },
+        { required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` },
         () => ({
           validator(_, val) {
             if (val) {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/PostgreSQL.ts b/inlong-dashboard/src/plugins/sinks/defaults/PostgreSQL.ts
index 2e985b436..5c6bb7661 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/PostgreSQL.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/PostgreSQL.ts
@@ -191,7 +191,7 @@ const getFieldListColumns = sinkValues => {
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
       rules: [
-        { required: true },
+        { required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` },
         () => ({
           validator(_, val) {
             if (val) {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/Redis.ts b/inlong-dashboard/src/plugins/sinks/defaults/Redis.ts
index 3cec034f7..6b95d4a48 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/Redis.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/Redis.ts
@@ -410,7 +410,7 @@ const getFieldListColumns = sinkValues => {
         options: redisTargetTypes,
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
     },
     {
       title: i18n.t('meta.Sinks.Redis.FieldFormat'),
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/SQLServer.ts b/inlong-dashboard/src/plugins/sinks/defaults/SQLServer.ts
index 9218985f0..958992a79 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/SQLServer.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/SQLServer.ts
@@ -228,7 +228,7 @@ const getFieldListColumns = sinkValues => {
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
       rules: [
-        { required: true },
+        { required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` },
         () => ({
           validator(_, val) {
             if (val) {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/StarRocks.ts b/inlong-dashboard/src/plugins/sinks/defaults/StarRocks.ts
index a7e4c04da..6a20aeb7b 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/StarRocks.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/StarRocks.ts
@@ -202,7 +202,7 @@ const getFieldListColumns = sinkValues => {
         allowClear: true,
       }),
       rules: [
-        { required: true },
+        { required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` },
         () => ({
           validator(_, val) {
             if (val) {
diff --git a/inlong-dashboard/src/plugins/sinks/defaults/TDSQLPostgreSQL.ts b/inlong-dashboard/src/plugins/sinks/defaults/TDSQLPostgreSQL.ts
index 6a7921b38..785922467 100644
--- a/inlong-dashboard/src/plugins/sinks/defaults/TDSQLPostgreSQL.ts
+++ b/inlong-dashboard/src/plugins/sinks/defaults/TDSQLPostgreSQL.ts
@@ -185,7 +185,7 @@ const getFieldListColumns = sinkValues => {
         options: tdsqlPostgreSQLFieldTypes,
         disabled: [110, 130].includes(sinkValues?.status as number) && !isNew,
       }),
-      rules: [{ required: true }],
+      rules: [{ required: true, message: `${i18n.t('meta.Sinks.FieldTypeMessage')}` }],
     },
     {
       title: i18n.t('meta.Sinks.TDSQLPostgreSQL.IsMetaField'),
diff --git a/inlong-dashboard/src/ui/locales/cn.json b/inlong-dashboard/src/ui/locales/cn.json
index f34ff9c9c..5d8ccaf3f 100644
--- a/inlong-dashboard/src/ui/locales/cn.json
+++ b/inlong-dashboard/src/ui/locales/cn.json
@@ -124,6 +124,7 @@
   "meta.Sinks.EnableCreateResource": "是否创建资源",
   "meta.Sinks.EnableCreateResourceHelp": "如果库表已经存在,且无需修改,则选【不创建】,否则请选择【创建】,由系统自动创建资源。",
   "meta.Sinks.DataNodeName": "数据节点",
+  "meta.Sinks.FieldTypeMessage": "请输入字段类型",
   "meta.Sinks.Hive.FileFormat": "落地格式",
   "meta.Sinks.Hive.Day": "天",
   "meta.Sinks.Hive.DataEncoding": "数据编码",
diff --git a/inlong-dashboard/src/ui/locales/en.json b/inlong-dashboard/src/ui/locales/en.json
index 82d06bfab..26fc49b09 100644
--- a/inlong-dashboard/src/ui/locales/en.json
+++ b/inlong-dashboard/src/ui/locales/en.json
@@ -124,6 +124,7 @@
   "meta.Sinks.EnableCreateResource": "EnableCreateResource",
   "meta.Sinks.EnableCreateResourceHelp": "If the library table already exists and does not need to be modified, select [Do not create], otherwise select [Create], and the system will automatically create the resource.",
   "meta.Sinks.DataNodeName": "DataNode",
+  "meta.Sinks.FieldTypeMessage": "Please enter field type",
   "meta.Sinks.Hive.FileFormat": "File format",
   "meta.Sinks.Hive.Day": "Day(s)",
   "meta.Sinks.Hive.DataEncoding": "Data encoding",