sunlishuo25 commented on code in PR #18673:
URL: 
https://github.com/apache/dolphinscheduler/pull/18673#discussion_r4387495301


##########
dolphinscheduler-ui/src/locales/zh_CN/project.ts:
##########
@@ -398,6 +398,7 @@ export default {
     minute: '分',
     second: '秒',
     delay_execution_time: '延时执行时间',
+    task_execute_type: '任务执行类型',

Review Comment:
   New label for the select. The two options reuse the existing 
`project.task.batch_task` (批量任务) and `project.task.stream_task` (实时任务), so they 
match the Batch/Stream tabs on the Task Instance page.



##########
dolphinscheduler-ui/src/locales/en_US/project.ts:
##########
@@ -406,6 +406,7 @@ export default {
     minute: 'Minute',
     second: 'Second',
     delay_execution_time: 'Delay execution time',
+    task_execute_type: 'Task execution type',

Review Comment:
   English label for the select. The options reuse the existing `Batch Task` / 
`Stream Task` labels.



##########
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-sea-tunnel.ts:
##########
@@ -55,6 +55,20 @@ export function useSeaTunnel(model: { [field: string]: any 
}): IJsonItem[] {
   )
 
   return [
+    {
+      type: 'select',
+      field: 'taskExecuteType',
+      span: 12,
+      name: t('project.node.task_execute_type'),
+      options: [
+        { label: t('project.task.batch_task'), value: 'BATCH' },
+        { label: t('project.task.stream_task'), value: 'STREAM' }
+      ],
+      validate: {
+        trigger: ['input', 'blur'],
+        required: true
+      }
+    },

Review Comment:
   SeaTunnel can run either batch or streaming jobs (`job.mode` in the config), 
but `taskExecuteType` was always defaulted to `BATCH` by `use-task.ts`, because 
only `FLINK_STREAM` is marked as `STREAM` in `TASK_TYPES_MAP`. This select lets 
the user set it explicitly.
   
   - It is added to the `useSeaTunnel` list like the other SeaTunnel params, so 
`fields/index.ts` and the task form list are unchanged.
   - Rendering and the required check reuse the common `select` field and 
`validate` rule, the same as Worker group.
   - No `value` is set here on purpose: the default `BATCH` still comes from 
`use-task.ts`, and when an existing task is opened, `detail-modal.tsx` restores 
the saved value instead of overwriting it.



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