You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/04/07 02:20:47 UTC

[GitHub] [incubator-inlong] leezng commented on a diff in pull request #3558: [INLONG-3556][Dashboard] Add Iceberg params to adapt the Manager module

leezng commented on code in PR #3558:
URL: https://github.com/apache/incubator-inlong/pull/3558#discussion_r844574924


##########
inlong-dashboard/src/components/AccessHelper/DataStorageEditor/DetailModal.tsx:
##########
@@ -186,11 +187,27 @@ const Comp: React.FC<DetailModalProps> = ({
       {
         name: 'sinkName',
         type: 'input',
-        label: t('components.AccessHelper.DataStorageEditor.SinkName'),
-        rules: [{ required: true }],
+        label: t('components.AccessHelper.StorageMetaData.SinkName'),
+        rules: [
+          { required: true },
+          {
+            pattern: /^[a-zA-Z][a-zA-Z0-9_]*$/,
+            message: i18n.t('components.AccessHelper.StorageMetaData.SinkNameRule'),
+          },
+        ],
         props: {
           disabled: !!id,
         },
+      },
+      {
+        name: 'description',
+        type: 'textarea',
+        label: i18n.t('components.AccessHelper.StorageMetaData.Description'),

Review Comment:
   You can use `t('')` directly here, no need for `i18n.t`



##########
inlong-dashboard/src/components/AccessHelper/DataStorageEditor/DetailModal.tsx:
##########
@@ -186,11 +187,27 @@ const Comp: React.FC<DetailModalProps> = ({
       {
         name: 'sinkName',
         type: 'input',
-        label: t('components.AccessHelper.DataStorageEditor.SinkName'),
-        rules: [{ required: true }],
+        label: t('components.AccessHelper.StorageMetaData.SinkName'),
+        rules: [
+          { required: true },
+          {
+            pattern: /^[a-zA-Z][a-zA-Z0-9_]*$/,
+            message: i18n.t('components.AccessHelper.StorageMetaData.SinkNameRule'),
+          },
+        ],
         props: {
           disabled: !!id,
         },
+      },
+      {
+        name: 'description',
+        type: 'textarea',
+        label: i18n.t('components.AccessHelper.StorageMetaData.Description'),
+        rules: [{ required: false }],

Review Comment:
   This is not required, no need to set rules.



##########
inlong-dashboard/src/components/MetaData/StorageIceberg.tsx:
##########
@@ -128,27 +130,96 @@ const getForm: GetStorageFormFieldsType = (
       _inTable: true,
     },
     {
-      name: 'dataType',
-      type: 'select',
-      label: i18n.t('components.AccessHelper.StorageMetaData.Iceberg.DataType'),
-      initialValue: 'Iceberg',
+      type: 'radio',
+      label: i18n.t('components.AccessHelper.StorageMetaData.Hive.EnableCreateResource'),
+      name: 'enableCreateResource',
       rules: [{ required: true }],
+      initialValue: 1,
+      tooltip: i18n.t('components.AccessHelper.StorageMetaData.Hive.EnableCreateResourceHelp'),
       props: {
         disabled: isEdit && [110, 130].includes(currentValues?.status),
         options: [
           {
-            label: 'Iceberg',
-            value: 'Iceberg',
+            label: i18n.t('basic.Yes'),
+            value: 0,

Review Comment:
   Yes = 0 ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org