From d2f83ee8cf623630ca971975b4c4337b31b529f3 Mon Sep 17 00:00:00 2001 From: Stalary Date: Fri, 5 May 2023 14:52:27 +0800 Subject: [PATCH] [Feature] Support run all level dependent when complement (#11778) * ADD: support all level dependent * MOD: delete log * MOD: format * FIX: ut * ADD: ut * format --- .../api/controller/ExecutorController.java | 16 +++-- .../api/python/PythonGateway.java | 3 +- .../api/service/ExecutorService.java | 3 +- .../api/service/impl/ExecutorServiceImpl.java | 60 ++++++++++++++----- .../ExecuteFunctionControllerTest.java | 11 ++-- .../service/ExecuteFunctionServiceTest.java | 46 ++++++++++---- .../src/locales/en_US/project.ts | 1 + .../src/locales/zh_CN/project.ts | 1 + .../definition/components/start-modal.tsx | 19 ++++++ .../definition/components/use-form.ts | 3 +- 10 files changed, 122 insertions(+), 41 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java index e8cc4327bc..0cd3a59346 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java @@ -122,7 +122,8 @@ public class ExecutorController extends BaseController { @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema = @Schema(implementation = int.class, example = "8")), @Parameter(name = "dryRun", description = "DRY_RUN", schema = @Schema(implementation = int.class, example = "0")), @Parameter(name = "testFlag", description = "TEST_FLAG", schema = @Schema(implementation = int.class, example = "0")), - @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema = @Schema(implementation = ComplementDependentMode.class)) + @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema = @Schema(implementation = ComplementDependentMode.class)), + @Parameter(name = "allLevelDependent", description = "ALL_LEVEL_DEPENDENT", schema = @Schema(implementation = boolean.class, example = "false")) }) @PostMapping(value = "start-process-instance") @ResponseStatus(HttpStatus.OK) @@ -149,7 +150,8 @@ public class ExecutorController extends BaseController { @RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun, @RequestParam(value = "testFlag", defaultValue = "0") int testFlag, @RequestParam(value = "complementDependentMode", required = false) ComplementDependentMode complementDependentMode, - @RequestParam(value = "version", required = false) Integer version) { + @RequestParam(value = "version", required = false) Integer version, + @RequestParam(value = "allLevelDependent", required = false, defaultValue = "false") boolean allLevelDependent) { if (timeout == null) { timeout = Constants.MAX_TASK_TIMEOUT; @@ -168,7 +170,7 @@ public class ExecutorController extends BaseController { startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority, workerGroup, tenantCode, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun, testFlag, - complementDependentMode, version); + complementDependentMode, version, allLevelDependent); return returnDataList(result); } @@ -215,7 +217,8 @@ public class ExecutorController extends BaseController { @Parameter(name = "expectedParallelismNumber", description = "EXPECTED_PARALLELISM_NUMBER", schema = @Schema(implementation = int.class, example = "8")), @Parameter(name = "dryRun", description = "DRY_RUN", schema = @Schema(implementation = int.class, example = "0")), @Parameter(name = "testFlag", description = "TEST_FLAG", schema = @Schema(implementation = int.class, example = "0")), - @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema = @Schema(implementation = ComplementDependentMode.class)) + @Parameter(name = "complementDependentMode", description = "COMPLEMENT_DEPENDENT_MODE", schema = @Schema(implementation = ComplementDependentMode.class)), + @Parameter(name = "allLevelDependent", description = "ALL_LEVEL_DEPENDENT", schema = @Schema(implementation = boolean.class, example = "false")) }) @PostMapping(value = "batch-start-process-instance") @ResponseStatus(HttpStatus.OK) @@ -241,7 +244,8 @@ public class ExecutorController extends BaseController { @RequestParam(value = "expectedParallelismNumber", required = false) Integer expectedParallelismNumber, @RequestParam(value = "dryRun", defaultValue = "0", required = false) int dryRun, @RequestParam(value = "testFlag", defaultValue = "0") int testFlag, - @RequestParam(value = "complementDependentMode", required = false) ComplementDependentMode complementDependentMode) { + @RequestParam(value = "complementDependentMode", required = false) ComplementDependentMode complementDependentMode, + @RequestParam(value = "allLevelDependent", required = false, defaultValue = "false") boolean allLevelDependent) { if (timeout == null) { log.debug("Parameter timeout set to {} due to null.", Constants.MAX_TASK_TIMEOUT); @@ -271,7 +275,7 @@ public class ExecutorController extends BaseController { startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority, workerGroup, tenantCode, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun, testFlag, - complementDependentMode, null); + complementDependentMode, null, allLevelDependent); if (!Status.SUCCESS.equals(result.get(Constants.STATUS))) { log.error("Process definition start failed, projectCode:{}, processDefinitionCode:{}.", projectCode, diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java index 4ed8768a7e..d2eced336d 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java @@ -404,7 +404,8 @@ public class PythonGateway { DEFAULT_DRY_RUN, DEFAULT_TEST_FLAG, COMPLEMENT_DEPENDENT_MODE, - processDefinition.getVersion()); + processDefinition.getVersion(), + false); } // side object diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java index 736004ff2d..9e8ee66de0 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java @@ -71,7 +71,8 @@ public interface ExecutorService { Integer timeout, Map startParams, Integer expectedParallelismNumber, int dryRun, int testFlag, - ComplementDependentMode complementDependentMode, Integer version); + ComplementDependentMode complementDependentMode, Integer version, + boolean allLevelDependent); /** * check whether the process definition can be executed diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java index b9c7de3b63..cd57d92166 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java @@ -222,7 +222,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ Long environmentCode, Integer timeout, Map startParams, Integer expectedParallelismNumber, int dryRun, int testFlag, - ComplementDependentMode complementDependentMode, Integer version) { + ComplementDependentMode complementDependentMode, Integer version, + boolean allLevelDependent) { Project project = projectMapper.queryByCode(projectCode); // check user access for project Map result = @@ -264,7 +265,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority, workerGroup, tenantCode, environmentCode, startParams, expectedParallelismNumber, dryRun, testFlag, - complementDependentMode); + complementDependentMode, allLevelDependent); if (create > 0) { processDefinition.setWarningGroupId(warningGroupId); @@ -427,8 +428,6 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ /** * do action to workflow instance:pause, stop, repeat, recover from pause, recover from stop,rerun failed task - - * * @param loginUser login user * @param workflowInstanceId workflow instance id @@ -740,6 +739,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ * @param workerGroup workerGroup * @param testFlag testFlag * @param environmentCode environmentCode + * @param allLevelDependent allLevelDependent * @return command id */ private int createCommand(Long triggerCode, CommandType commandType, long processDefineCode, TaskDependType nodeDep, @@ -748,7 +748,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ Priority processInstancePriority, String workerGroup, String tenantCode, Long environmentCode, Map startParams, Integer expectedParallelismNumber, int dryRun, - int testFlag, ComplementDependentMode complementDependentMode) { + int testFlag, ComplementDependentMode complementDependentMode, + boolean allLevelDependent) { /** * instantiate command schedule instance @@ -807,7 +808,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ log.info("Start to create {} command, processDefinitionCode:{}.", command.getCommandType().getDescp(), processDefineCode); return createComplementCommandList(triggerCode, schedule, runMode, command, expectedParallelismNumber, - complementDependentMode); + complementDependentMode, allLevelDependent); } catch (CronParseException cronParseException) { // We catch the exception here just to make compiler happy, since we have already validated the schedule // cron expression before @@ -834,7 +835,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ protected int createComplementCommandList(Long triggerCode, String scheduleTimeParam, RunMode runMode, Command command, Integer expectedParallelismNumber, - ComplementDependentMode complementDependentMode) throws CronParseException { + ComplementDependentMode complementDependentMode, + boolean allLevelDependent) throws CronParseException { int createCount = 0; String startDate = null; String endDate = null; @@ -894,7 +896,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ log.info( "Complement dependent mode is all dependent and Scheduler is not empty, need create complement dependent command, processDefinitionCode:{}.", command.getProcessDefinitionCode()); - dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command); + dependentProcessDefinitionCreateCount += + createComplementDependentCommand(schedules, command, allLevelDependent); } } if (createCount > 0) { @@ -963,7 +966,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ "Complement dependent mode is all dependent and Scheduler is not empty, need create complement dependent command, processDefinitionCode:{}.", command.getProcessDefinitionCode()); dependentProcessDefinitionCreateCount += - createComplementDependentCommand(schedules, command); + createComplementDependentCommand(schedules, command, allLevelDependent); } } } @@ -1004,7 +1007,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ /** * create complement dependent command */ - public int createComplementDependentCommand(List schedules, Command command) { + public int createComplementDependentCommand(List schedules, Command command, boolean allLevelDependent) { int dependentProcessDefinitionCreateCount = 0; Command dependentCommand; @@ -1017,7 +1020,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ List dependentProcessDefinitionList = getComplementDependentDefinitionList(dependentCommand.getProcessDefinitionCode(), - CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup()); + CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup(), + allLevelDependent); dependentCommand.setTaskDependType(TaskDependType.TASK_POST); for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) { // If the id is Integer, the auto-increment id will be obtained by mybatis-plus @@ -1041,12 +1045,38 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ */ private List getComplementDependentDefinitionList(long processDefinitionCode, CycleEnum processDefinitionCycle, - String workerGroup) { + String workerGroup, + boolean allLevelDependent) { List dependentProcessDefinitionList = - processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode); + checkDependentProcessDefinitionValid( + processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode), + processDefinitionCycle, workerGroup, + processDefinitionCode); + + if (dependentProcessDefinitionList.isEmpty()) { + return dependentProcessDefinitionList; + } - return checkDependentProcessDefinitionValid(dependentProcessDefinitionList, processDefinitionCycle, - workerGroup, processDefinitionCode); + if (allLevelDependent) { + List childList = new ArrayList<>(dependentProcessDefinitionList); + while (true) { + List childDependentList = childList + .stream() + .flatMap(dependentProcessDefinition -> checkDependentProcessDefinitionValid( + processService.queryDependentProcessDefinitionByProcessDefinitionCode( + dependentProcessDefinition.getProcessDefinitionCode()), + processDefinitionCycle, + workerGroup, + dependentProcessDefinition.getProcessDefinitionCode()).stream()) + .collect(Collectors.toList()); + if (childDependentList.isEmpty()) { + break; + } + dependentProcessDefinitionList.addAll(childDependentList); + childList = new ArrayList<>(childDependentList); + } + } + return dependentProcessDefinitionList; } /** diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ExecuteFunctionControllerTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ExecuteFunctionControllerTest.java index b435a7dd58..83f66dbeac 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ExecuteFunctionControllerTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ExecuteFunctionControllerTest.java @@ -79,7 +79,7 @@ public class ExecuteFunctionControllerTest extends AbstractControllerTest { final int testFlag = 0; final ComplementDependentMode complementDependentMode = ComplementDependentMode.OFF_MODE; final Integer version = null; - + final boolean allLevelDependent = false; final JsonObject expectResponseContent = gson .fromJson("{\"code\":0,\"msg\":\"success\",\"data\":\"Test Data\",\"success\":true,\"failed\":false}", JsonObject.class); @@ -119,7 +119,8 @@ public class ExecuteFunctionControllerTest extends AbstractControllerTest { eq(warningGroupId), eq(runMode), eq(processInstancePriority), eq(workerGroup), eq(tenantCode), eq(environmentCode), eq(timeout), eq(startParams), eq(expectedParallelismNumber), eq(dryRun), eq(testFlag), - eq(complementDependentMode), eq(version))) + eq(complementDependentMode), eq(version), + eq(allLevelDependent))) .thenReturn(executeServiceResult); // When @@ -165,7 +166,7 @@ public class ExecuteFunctionControllerTest extends AbstractControllerTest { eq(environmentCode), eq(Constants.MAX_TASK_TIMEOUT), eq(startParams), eq(expectedParallelismNumber), eq(dryRun), eq(testFlag), - eq(complementDependentMode), eq(version))).thenReturn(executeServiceResult); + eq(complementDependentMode), eq(version), eq(allLevelDependent))).thenReturn(executeServiceResult); // When final MvcResult mvcResult = mockMvc @@ -209,7 +210,7 @@ public class ExecuteFunctionControllerTest extends AbstractControllerTest { eq(warningGroupId), eq(runMode), eq(processInstancePriority), eq(workerGroup), eq(tenantCode), eq(environmentCode), eq(timeout), eq(null), eq(expectedParallelismNumber), eq(dryRun), eq(testFlag), - eq(complementDependentMode), eq(version))).thenReturn(executeServiceResult); + eq(complementDependentMode), eq(version), eq(allLevelDependent))).thenReturn(executeServiceResult); // When final MvcResult mvcResult = mockMvc @@ -238,7 +239,7 @@ public class ExecuteFunctionControllerTest extends AbstractControllerTest { eq(scheduleTime), eq(null), eq(failureStrategy), eq(null), eq(null), eq(warningType), eq(null), eq(null), eq(null), eq("default"), eq("default"), eq(-1L), eq(Constants.MAX_TASK_TIMEOUT), eq(null), eq(null), eq(0), eq(0), - eq(complementDependentMode), eq(version))).thenReturn(executeServiceResult); + eq(complementDependentMode), eq(version), eq(allLevelDependent))).thenReturn(executeServiceResult); // When final MvcResult mvcResult = mockMvc diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecuteFunctionServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecuteFunctionServiceTest.java index 150a2a664d..7c6a2981cc 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecuteFunctionServiceTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecuteFunctionServiceTest.java @@ -282,7 +282,8 @@ public class ExecuteFunctionServiceTest { RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 10, null, 0, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); Assertions.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(commandService, times(1)).createCommand(any(Command.class)); @@ -306,7 +307,8 @@ public class ExecuteFunctionServiceTest { RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); Assertions.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(commandService, times(1)).createCommand(any(Command.class)); @@ -329,7 +331,8 @@ public class ExecuteFunctionServiceTest { Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); } catch (ServiceException e) { Assertions.assertEquals(Status.START_NODE_NOT_EXIST_IN_LAST_PROCESS.getCode(), e.getCode()); } @@ -375,8 +378,23 @@ public class ExecuteFunctionServiceTest { command.setProcessDefinitionCode(processDefinitionCode); command.setExecutorId(1); - int count = executorService.createComplementDependentCommand(schedules, command); + // not enable allLevelDependent + int count = executorService.createComplementDependentCommand(schedules, command, false); Assertions.assertEquals(1, count); + + // enable allLevelDependent + DependentProcessDefinition childDependent = new DependentProcessDefinition(); + childDependent.setProcessDefinitionCode(3); + childDependent.setProcessDefinitionVersion(1); + childDependent.setTaskDefinitionCode(4); + childDependent.setWorkerGroup(Constants.DEFAULT_WORKER_GROUP); + childDependent.setTaskParams( + "{\"localParams\":[],\"resourceList\":[],\"dependence\":{\"relation\":\"AND\",\"dependTaskList\":[{\"relation\":\"AND\",\"dependItemList\":[{\"depTaskCode\":3,\"status\":\"SUCCESS\"}]}]},\"conditionResult\":{\"successNode\":[1],\"failedNode\":[1]}}"); + Mockito.when(processService.queryDependentProcessDefinitionByProcessDefinitionCode( + dependentProcessDefinition.getProcessDefinitionCode())).thenReturn(Lists.newArrayList(childDependent)) + .thenReturn(Lists.newArrayList()); + int allLevelDependentCount = executorService.createComplementDependentCommand(schedules, command, true); + Assertions.assertEquals(2, allLevelDependentCount); } /** @@ -397,7 +415,8 @@ public class ExecuteFunctionServiceTest { RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); Assertions.assertEquals(Status.START_PROCESS_INSTANCE_ERROR, result.get(Constants.STATUS)); verify(commandService, times(0)).createCommand(any(Command.class)); } @@ -420,7 +439,8 @@ public class ExecuteFunctionServiceTest { RunMode.RUN_MODE_SERIAL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); Assertions.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(commandService, times(1)).createCommand(any(Command.class)); } @@ -443,7 +463,8 @@ public class ExecuteFunctionServiceTest { RunMode.RUN_MODE_PARALLEL, Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 110, null, 0, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); Assertions.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(commandService, times(31)).createCommand(any(Command.class)); @@ -468,7 +489,8 @@ public class ExecuteFunctionServiceTest { Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 110, null, 15, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); Assertions.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); verify(commandService, times(15)).createCommand(any(Command.class)); @@ -499,9 +521,8 @@ public class ExecuteFunctionServiceTest { 0, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_NO, - ComplementDependentMode.OFF_MODE, - null)); - + ComplementDependentMode.OFF_MODE, null, + false)); } @Test @@ -533,7 +554,8 @@ public class ExecuteFunctionServiceTest { Priority.LOW, Constants.DEFAULT_WORKER_GROUP, tenantCode, 100L, 110, null, 15, Constants.DRY_RUN_FLAG_NO, Constants.TEST_FLAG_YES, - ComplementDependentMode.OFF_MODE, null); + ComplementDependentMode.OFF_MODE, null, + false); Assertions.assertEquals(Status.SUCCESS, result.get(Constants.STATUS)); } diff --git a/dolphinscheduler-ui/src/locales/en_US/project.ts b/dolphinscheduler-ui/src/locales/en_US/project.ts index 24b90a7af3..2854b0db34 100644 --- a/dolphinscheduler-ui/src/locales/en_US/project.ts +++ b/dolphinscheduler-ui/src/locales/en_US/project.ts @@ -206,6 +206,7 @@ export default { cancel_full_screen: 'Cancel full screen', task_state: 'Task status', mode_of_dependent: 'Mode of dependent', + all_level_dependent: 'all level dependent', open: 'Open', project_name_required: 'Project name is required', related_items: 'Related items', diff --git a/dolphinscheduler-ui/src/locales/zh_CN/project.ts b/dolphinscheduler-ui/src/locales/zh_CN/project.ts index 71086b1ce9..fba872694f 100644 --- a/dolphinscheduler-ui/src/locales/zh_CN/project.ts +++ b/dolphinscheduler-ui/src/locales/zh_CN/project.ts @@ -207,6 +207,7 @@ export default { cancel_full_screen: '取消全屏', task_state: '任务状态', mode_of_dependent: '依赖模式', + all_level_dependent: '所有层级依赖', open: '打开', project_name_required: '项目名称必填', related_items: '关联项目', diff --git a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx index cfacf510cc..45e24e1506 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx +++ b/dolphinscheduler-ui/src/views/projects/workflow/definition/components/start-modal.tsx @@ -380,6 +380,25 @@ export default defineComponent({ + {this.startForm.complementDependentMode === 'ALL_DEPENDENT' && ( + + + + + {t('project.workflow.close')} + + + {t('project.workflow.open')} + + + + + )} { expectedParallelismNumber: '', dryRun: 0, testFlag: 0, - version: null + version: null, + allLevelDependent: false }, saving: false, rules: {