[Improvement-15910][UI] Supposed to provide a default value for the custom parallelism when using the mode of parallel execution. (#15912)

* worked out the issue

* imrpove the parallism strategy

* imrpove the parallism strategy

* merge from dev
This commit is contained in:
calvin 2024-04-28 18:47:20 +08:00 committed by GitHub
parent 7a55adeae9
commit 5a6c6c37f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 12 deletions

View File

@ -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',

View File

@ -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: '线上',

View File

@ -44,7 +44,8 @@ import {
NSwitch,
NCheckbox,
NDatePicker,
NRadioButton
NRadioButton,
NInputNumber
} from 'naive-ui'
import {
ArrowDownOutlined,
@ -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()
@ -296,7 +296,6 @@ export default defineComponent({
return {
t,
showTaskDependType,
parallelismRef,
hideModal,
handleStart,
generalWarningTypeListOptions,
@ -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>
)}

View File

@ -66,7 +66,7 @@ export const useForm = () => {
tenantCode: 'default',
environmentCode: null,
startParams: null,
expectedParallelismNumber: '',
expectedParallelismNumber: '2',
dryRun: 0,
testFlag: 0,
version: null,