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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to