Skip to content

Commit

Permalink
[Improvement-15910][UI] Supposed to provide a default value for the c…
Browse files Browse the repository at this point in the history
…ustom parallelism when using the mode of parallel execution. (apache#15912)

* worked out the issue

* imrpove the parallism strategy

* imrpove the parallism strategy

* merge from dev
  • Loading branch information
calvinjiang authored Apr 28, 2024
1 parent 7a55ade commit 5a6c6c3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
3 changes: 2 additions & 1 deletion dolphinscheduler-ui/src/locales/en_US/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ export default {
delete_task_validate_dependent_tasks_desc:
'The downstream dependent tasks exists. You can not delete the task.',
warning_delete_scheduler_dependent_tasks_desc:
'The downstream dependent tasks exists. Are you sure to delete the scheduler?'
'The downstream dependent tasks exists. Are you sure to delete the scheduler?',
warning_too_large_parallelism_number: 'The parallelism number is too large. It is better not to be over 10.'
},
task: {
on_line: 'Online',
Expand Down
3 changes: 2 additions & 1 deletion dolphinscheduler-ui/src/locales/zh_CN/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ export default {
delete_task_validate_dependent_tasks_desc:
'下游存在依赖,你不能删除该任务.',
warning_delete_scheduler_dependent_tasks_desc:
'下游存在依赖, 删除定时可能会对下游任务产生影响. 你确定要删除该定时嘛?'
'下游存在依赖, 删除定时可能会对下游任务产生影响. 你确定要删除该定时嘛?',
warning_too_large_parallelism_number: '并行度设置太大了, 最好不要超过10.',
},
task: {
on_line: '线上',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ import {
NSwitch,
NCheckbox,
NDatePicker,
NRadioButton
NRadioButton,
NInputNumber
} from 'naive-ui'
import {
ArrowDownOutlined,
Expand Down Expand Up @@ -75,7 +76,6 @@ export default defineComponent({
props,
emits: ['update:show', 'update:row', 'updateList'],
setup(props, ctx) {
const parallelismRef = ref(false)
const { t } = useI18n()
const route = useRoute()
const { startState } = useForm()
Expand Down Expand Up @@ -296,7 +296,6 @@ export default defineComponent({
return {
t,
showTaskDependType,
parallelismRef,
hideModal,
handleStart,
generalWarningTypeListOptions,
Expand Down Expand Up @@ -504,17 +503,20 @@ export default defineComponent({
<NFormItem
label={t('project.workflow.parallelism')}
path='expectedParallelismNumber'
feedback={t(
'project.workflow.warning_too_large_parallelism_number'
)}
validationStatus={'warning'}
showFeedback={
parseInt(this.startForm.expectedParallelismNumber) > 10
}
>
<NCheckbox v-model:checked={this.parallelismRef}>
{t('project.workflow.custom_parallelism')}
</NCheckbox>
<NInput
allowInput={this.trim}
disabled={!this.parallelismRef}
<NInputNumber
placeholder={t(
'project.workflow.please_enter_parallelism'
)}
v-model:value={this.startForm.expectedParallelismNumber}
min='1'
/>
</NFormItem>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const useForm = () => {
tenantCode: 'default',
environmentCode: null,
startParams: null,
expectedParallelismNumber: '',
expectedParallelismNumber: '2',
dryRun: 0,
testFlag: 0,
version: null,
Expand Down

0 comments on commit 5a6c6c3

Please sign in to comment.