leezng commented on code in PR #10782:
URL: https://github.com/apache/inlong/pull/10782#discussion_r1721399533


##########
inlong-dashboard/src/plugins/sync/common/SyncDefaultInfo.ts:
##########
@@ -87,7 +94,170 @@ export class SyncDefaultInfo implements DataWithBackend, 
RenderRow, RenderList {
   })
   @I18n('meta.Synchronize.SinkMultipleEnable')
   sinkMultipleEnable: boolean;
+  @FieldDecorator({
+    type: 'radio',
+    initialValue: 1,
+    rules: [{ required: true }],
+    props: {
+      options: [
+        {
+          label: i18n.t('meta.Synchronize.RealTime'),
+          value: 1,
+        },
+        {
+          label: i18n.t('meta.Synchronize.Offline'),
+          value: 2,
+        },
+      ],
+    },
+  })
+  @ColumnDecorator({
+    width: 200,
+    render: text => inlongGroupModeList?.filter(item => item.value === 
text)?.[0]?.label,
+  })
+  @I18n('meta.Synchronize.SyncType')
+  inlongGroupMode: Number;
 
+  @FieldDecorator({
+    type: 'radio',
+    initialValue: 0,
+    visible: values => values.inlongGroupMode === 2,
+    rules: [{ required: true }],
+    props: {
+      options: [
+        {
+          label: i18n.t('meta.Synchronize.Conventional'),
+          value: 0,
+        },
+        {
+          label: i18n.t('meta.Synchronize.Crontab'),
+          value: 1,
+        },
+      ],
+    },
+  })
+  @I18n('meta.Synchronize.ScheduleType')
+  scheduleType: Number;
+  @FieldDecorator({
+    visible: values => values.inlongGroupMode === 2 && values.scheduleType === 
0,
+    type: 'select',
+    initialValue: 'H',
+    name: 'scheduleUnit',
+    rules: [{ required: true }],
+    props: {
+      options: [
+        {
+          label: i18n.t('meta.Synchronize.ScheduleUnit.Year'),
+          value: 'Y',
+        },
+        {
+          label: i18n.t('meta.Synchronize.ScheduleUnit.Month'),
+          value: 'M',
+        },
+        {
+          label: i18n.t('meta.Synchronize.ScheduleUnit.Day'),
+          value: 'D',
+        },
+        {
+          label: i18n.t('meta.Synchronize.ScheduleUnit.Hours'),
+          value: 'H',
+        },
+        {
+          label: i18n.t('meta.Synchronize.ScheduleUnit.Minute'),
+          value: 'I',
+        },
+        {
+          label: i18n.t('meta.Synchronize.ScheduleUnit.Single'),
+          value: 'O',
+        },
+      ],
+    },
+  })
+  @I18n('meta.Synchronize.ScheduleUnit')
+  scheduleUnit: String;
+
+  @FieldDecorator({
+    type: 'input',
+    initialValue: 0,
+    rules: [{ required: true, pattern: new RegExp(/^[0-9]\d*$/, 'g') }],
+    visible: values => values.inlongGroupMode === 2 && values.scheduleType === 
0,
+    props: values => ({
+      suffix: values.scheduleUnit,
+    }),
+  })
+  @I18n('meta.Synchronize.ScheduleInterval')
+  scheduleInterval: number;
+
+  @FieldDecorator({
+    visible: values => values.inlongGroupMode === 2 && values.scheduleType === 
0,
+    type: TimePicker,
+    initialValue: dayjs('00:00', format),
+    name: 'delayTime',
+    rules: [{ required: true }],
+    props: {
+      format: format,
+    },
+  })
+  @I18n('meta.Synchronize.DelayTime')
+  delayTime: dayjs.Dayjs;
+
+  @FieldDecorator({
+    type: DatePicker.RangePicker,
+    props: values => ({
+      format: conventionalTimeFormat,
+      showTime: true,
+      disabledTime: (date: dayjs.Dayjs, type, info: { from?: dayjs.Dayjs }) => 
{
+        return {
+          disabledSeconds: () => range(0, 60),
+        };
+      },
+    }),
+    visible: values =>
+      values.inlongGroupMode === 2 && (values.scheduleType === 0 || 
values.scheduleType === 1),
+    rules: [{ required: true }],
+  })
+  @I18n('meta.Synchronize.ValidTime')
+  time: dayjs.Dayjs[];
+  @FieldDecorator({
+    visible: values => values.inlongGroupMode === 2 && values.scheduleType === 
1,
+    type: 'input',
+    rules: [{ required: true }],
+    props: {},
+  })
+  @I18n('crontab表达式')

Review Comment:
   It seems like locale configuration is missing?



-- 
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