break60 4 years ago
parent
commit
ecacc439c5
  1. 15
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
  2. 3
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java
  3. 12
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
  4. 21
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java
  5. 7
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java
  6. 8
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java
  7. 11
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectServiceTest.java
  8. 6
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.java
  9. 6
      dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.xml
  10. 8
      dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapperTest.java
  11. 4
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue
  12. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
  13. 2
      dolphinscheduler-ui/src/js/conf/home/store/dag/state.js

15
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java

@ -40,6 +40,7 @@ import org.apache.dolphinscheduler.api.service.ProcessDefinitionService;
import org.apache.dolphinscheduler.api.service.ProcessDefinitionVersionService; import org.apache.dolphinscheduler.api.service.ProcessDefinitionVersionService;
import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.utils.ParameterUtils; import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.common.utils.StringUtils; import org.apache.dolphinscheduler.common.utils.StringUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
@ -239,7 +240,7 @@ public class ProcessDefinitionController extends BaseController {
@ApiImplicitParam(name = "locations", value = "PROCESS_DEFINITION_LOCATIONS", required = true, type = "String"), @ApiImplicitParam(name = "locations", value = "PROCESS_DEFINITION_LOCATIONS", required = true, type = "String"),
@ApiImplicitParam(name = "connects", value = "PROCESS_DEFINITION_CONNECTS", required = true, type = "String"), @ApiImplicitParam(name = "connects", value = "PROCESS_DEFINITION_CONNECTS", required = true, type = "String"),
@ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, type = "String"), @ApiImplicitParam(name = "description", value = "PROCESS_DEFINITION_DESC", required = false, type = "String"),
@ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, dataType = "Int", example = "0") @ApiImplicitParam(name = "releaseState", value = "RELEASE_PROCESS_DEFINITION_NOTES", required = false, dataType = "ReleaseState")
}) })
@PostMapping(value = "/update") @PostMapping(value = "/update")
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)
@ -252,7 +253,7 @@ public class ProcessDefinitionController extends BaseController {
@RequestParam(value = "locations", required = false) String locations, @RequestParam(value = "locations", required = false) String locations,
@RequestParam(value = "connects", required = false) String connects, @RequestParam(value = "connects", required = false) String connects,
@RequestParam(value = "description", required = false) String description, @RequestParam(value = "description", required = false) String description,
@RequestParam(value = "releaseState", required = false, defaultValue = "0") int releaseState) { @RequestParam(value = "releaseState", required = false, defaultValue = "OFFLINE") ReleaseState releaseState) {
logger.info("login user {}, update process define, project name: {}, process define name: {}, " logger.info("login user {}, update process define, project name: {}, process define name: {}, "
+ "process_definition_json: {}, desc: {}, locations:{}, connects:{}", + "process_definition_json: {}, desc: {}, locations:{}, connects:{}",
@ -260,12 +261,12 @@ public class ProcessDefinitionController extends BaseController {
Map<String, Object> result = processDefinitionService.updateProcessDefinition(loginUser, projectName, id, name, Map<String, Object> result = processDefinitionService.updateProcessDefinition(loginUser, projectName, id, name,
processDefinitionJson, description, locations, connects); processDefinitionJson, description, locations, connects);
// If the update fails, the result will be returned directly // If the update fails, the result will be returned directly
Status status = (Status) result.get("status"); if (result.get(Constants.STATUS) != Status.SUCCESS) {
if (status.getCode() != 0) {
return returnDataList(result); return returnDataList(result);
} }
// Judge whether to go online after editing,0 means offline, 1 means online // Judge whether to go online after editing,0 means offline, 1 means online
if (releaseState == 1) { if (releaseState == ReleaseState.ONLINE) {
result = processDefinitionService.releaseProcessDefinition(loginUser, projectName, id, releaseState); result = processDefinitionService.releaseProcessDefinition(loginUser, projectName, id, releaseState);
} }
return returnDataList(result); return returnDataList(result);
@ -367,7 +368,7 @@ public class ProcessDefinitionController extends BaseController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String"), @ApiImplicitParam(name = "name", value = "PROCESS_DEFINITION_NAME", required = true, type = "String"),
@ApiImplicitParam(name = "processId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "processId", value = "PROCESS_DEFINITION_ID", required = true, dataType = "Int", example = "100"),
@ApiImplicitParam(name = "releaseState", value = "PROCESS_DEFINITION_CONNECTS", required = true, dataType = "Int", example = "100"), @ApiImplicitParam(name = "releaseState", value = "PROCESS_DEFINITION_CONNECTS", required = true, dataType = "ReleaseState"),
}) })
@PostMapping(value = "/release") @PostMapping(value = "/release")
@ResponseStatus(HttpStatus.OK) @ResponseStatus(HttpStatus.OK)
@ -375,7 +376,7 @@ public class ProcessDefinitionController extends BaseController {
public Result releaseProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser, public Result releaseProcessDefinition(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
@ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName, @ApiParam(name = "projectName", value = "PROJECT_NAME", required = true) @PathVariable String projectName,
@RequestParam(value = "processId", required = true) int processId, @RequestParam(value = "processId", required = true) int processId,
@RequestParam(value = "releaseState", required = true) int releaseState) { @RequestParam(value = "releaseState", required = true) ReleaseState releaseState) {
logger.info("login user {}, release process definition, project name: {}, release state: {}", logger.info("login user {}, release process definition, project name: {}, release state: {}",
loginUser.getUserName(), projectName, releaseState); loginUser.getUserName(), projectName, releaseState);

3
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java

@ -17,6 +17,7 @@
package org.apache.dolphinscheduler.api.service; package org.apache.dolphinscheduler.api.service;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.dao.entity.ProcessData; import org.apache.dolphinscheduler.dao.entity.ProcessData;
import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.entity.User;
@ -190,7 +191,7 @@ public interface ProcessDefinitionService {
Map<String, Object> releaseProcessDefinition(User loginUser, Map<String, Object> releaseProcessDefinition(User loginUser,
String projectName, String projectName,
int id, int id,
int releaseState); ReleaseState releaseState);
/** /**
* batch export process definition by ids * batch export process definition by ids

12
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java

@ -583,7 +583,7 @@ public class ProcessDefinitionServiceImpl extends BaseService implements
*/ */
@Override @Override
@Transactional(rollbackFor = RuntimeException.class) @Transactional(rollbackFor = RuntimeException.class)
public Map<String, Object> releaseProcessDefinition(User loginUser, String projectName, int id, int releaseState) { public Map<String, Object> releaseProcessDefinition(User loginUser, String projectName, int id, ReleaseState releaseState) {
HashMap<String, Object> result = new HashMap<>(); HashMap<String, Object> result = new HashMap<>();
Project project = projectMapper.queryByName(projectName); Project project = projectMapper.queryByName(projectName);
@ -593,17 +593,15 @@ public class ProcessDefinitionServiceImpl extends BaseService implements
return checkResult; return checkResult;
} }
ReleaseState state = ReleaseState.getEnum(releaseState);
// check state // check state
if (null == state) { if (null == releaseState) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, RELEASESTATE); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, RELEASESTATE);
return result; return result;
} }
ProcessDefinition processDefinition = processDefineMapper.selectById(id); ProcessDefinition processDefinition = processDefineMapper.selectById(id);
switch (state) { switch (releaseState) {
case ONLINE: case ONLINE:
// To check resources whether they are already cancel authorized or deleted // To check resources whether they are already cancel authorized or deleted
String resourceIds = processDefinition.getResourceIds(); String resourceIds = processDefinition.getResourceIds();
@ -619,11 +617,11 @@ public class ProcessDefinitionServiceImpl extends BaseService implements
} }
} }
processDefinition.setReleaseState(state); processDefinition.setReleaseState(releaseState);
processDefineMapper.updateById(processDefinition); processDefineMapper.updateById(processDefinition);
break; break;
case OFFLINE: case OFFLINE:
processDefinition.setReleaseState(state); processDefinition.setReleaseState(releaseState);
processDefineMapper.updateById(processDefinition); processDefineMapper.updateById(processDefinition);
List<Schedule> scheduleList = scheduleMapper.selectAllByProcessDefineArray( List<Schedule> scheduleList = scheduleMapper.selectAllByProcessDefineArray(
new int[]{processDefinition.getId()} new int[]{processDefinition.getId()}

21
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java

@ -24,6 +24,7 @@ import org.apache.dolphinscheduler.api.service.ProjectService;
import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.UserType; import org.apache.dolphinscheduler.common.enums.UserType;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.ProjectUser; import org.apache.dolphinscheduler.dao.entity.ProjectUser;
@ -442,21 +443,13 @@ public class ProjectServiceImpl extends BaseService implements ProjectService {
*/ */
public Map<String, Object> queryAllProjectList() { public Map<String, Object> queryAllProjectList() {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
List<Project> projects = projectMapper.selectList(null); List<Project> projects = new ArrayList<>();
List<ProcessDefinition> processDefinitions = processDefinitionMapper.selectList(null);
if (projects != null) { List<Integer> projectIds = processDefinitionMapper.listProjectIds();
Set<Integer> set = new HashSet<>(); if (CollectionUtils.isNotEmpty(projectIds)) {
for (ProcessDefinition processDefinition : processDefinitions) { projects = projectMapper.selectBatchIds(projectIds);
set.add(processDefinition.getProjectId());
}
List<Project> tempDeletelist = new ArrayList<>();
for (Project project : projects) {
if (!set.contains(project.getId())) {
tempDeletelist.add(project);
}
}
projects.removeAll(tempDeletelist);
} }
result.put(Constants.DATA_LIST, projects); result.put(Constants.DATA_LIST, projects);
putMsg(result, Status.SUCCESS); putMsg(result, Status.SUCCESS);
return result; return result;

7
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionControllerTest.java

@ -142,7 +142,6 @@ public class ProcessDefinitionControllerTest {
String description = "desc test"; String description = "desc test";
String connects = "[]"; String connects = "[]";
int id = 1; int id = 1;
int releaseState = 0;
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS); putMsg(result, Status.SUCCESS);
result.put("processDefinitionId", 1); result.put("processDefinitionId", 1);
@ -151,7 +150,7 @@ public class ProcessDefinitionControllerTest {
description, locations, connects)).thenReturn(result); description, locations, connects)).thenReturn(result);
Result response = processDefinitionController.updateProcessDefinition(user, projectName, name, id, json, Result response = processDefinitionController.updateProcessDefinition(user, projectName, name, id, json,
locations, connects, description,releaseState); locations, connects, description,ReleaseState.OFFLINE);
Assert.assertEquals(Status.SUCCESS.getCode(), response.getCode().intValue()); Assert.assertEquals(Status.SUCCESS.getCode(), response.getCode().intValue());
} }
@ -162,8 +161,8 @@ public class ProcessDefinitionControllerTest {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
putMsg(result, Status.SUCCESS); putMsg(result, Status.SUCCESS);
Mockito.when(processDefinitionService.releaseProcessDefinition(user, projectName, id, ReleaseState.OFFLINE.ordinal())).thenReturn(result); Mockito.when(processDefinitionService.releaseProcessDefinition(user, projectName, id, ReleaseState.OFFLINE)).thenReturn(result);
Result response = processDefinitionController.releaseProcessDefinition(user, projectName, id, ReleaseState.OFFLINE.ordinal()); Result response = processDefinitionController.releaseProcessDefinition(user, projectName, id, ReleaseState.OFFLINE);
Assert.assertEquals(Status.SUCCESS.getCode(), response.getCode().intValue()); Assert.assertEquals(Status.SUCCESS.getCode(), response.getCode().intValue());
} }

8
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java

@ -592,14 +592,14 @@ public class ProcessDefinitionServiceTest {
putMsg(result, Status.PROJECT_NOT_FOUNT, projectName); putMsg(result, Status.PROJECT_NOT_FOUNT, projectName);
Mockito.when(projectService.checkProjectAndAuth(loginUser, project, projectName)).thenReturn(result); Mockito.when(projectService.checkProjectAndAuth(loginUser, project, projectName)).thenReturn(result);
Map<String, Object> map = processDefinitionService.releaseProcessDefinition(loginUser, "project_test1", Map<String, Object> map = processDefinitionService.releaseProcessDefinition(loginUser, "project_test1",
6, ReleaseState.OFFLINE.getCode()); 6, ReleaseState.OFFLINE);
Assert.assertEquals(Status.PROJECT_NOT_FOUNT, map.get(Constants.STATUS)); Assert.assertEquals(Status.PROJECT_NOT_FOUNT, map.get(Constants.STATUS));
// project check auth success, processs definition online // project check auth success, processs definition online
putMsg(result, Status.SUCCESS, projectName); putMsg(result, Status.SUCCESS, projectName);
Mockito.when(processDefineMapper.selectById(46)).thenReturn(getProcessDefinition()); Mockito.when(processDefineMapper.selectById(46)).thenReturn(getProcessDefinition());
Map<String, Object> onlineRes = processDefinitionService.releaseProcessDefinition( Map<String, Object> onlineRes = processDefinitionService.releaseProcessDefinition(
loginUser, "project_test1", 46, ReleaseState.ONLINE.getCode()); loginUser, "project_test1", 46, ReleaseState.ONLINE);
Assert.assertEquals(Status.SUCCESS, onlineRes.get(Constants.STATUS)); Assert.assertEquals(Status.SUCCESS, onlineRes.get(Constants.STATUS));
// project check auth success, processs definition online // project check auth success, processs definition online
@ -608,12 +608,12 @@ public class ProcessDefinitionServiceTest {
Mockito.when(processDefineMapper.selectById(46)).thenReturn(processDefinition1); Mockito.when(processDefineMapper.selectById(46)).thenReturn(processDefinition1);
Mockito.when(processService.getUserById(1)).thenReturn(loginUser); Mockito.when(processService.getUserById(1)).thenReturn(loginUser);
Map<String, Object> onlineWithResourceRes = processDefinitionService.releaseProcessDefinition( Map<String, Object> onlineWithResourceRes = processDefinitionService.releaseProcessDefinition(
loginUser, "project_test1", 46, ReleaseState.ONLINE.getCode()); loginUser, "project_test1", 46, ReleaseState.ONLINE);
Assert.assertEquals(Status.SUCCESS, onlineWithResourceRes.get(Constants.STATUS)); Assert.assertEquals(Status.SUCCESS, onlineWithResourceRes.get(Constants.STATUS));
// release error code // release error code
Map<String, Object> failRes = processDefinitionService.releaseProcessDefinition( Map<String, Object> failRes = processDefinitionService.releaseProcessDefinition(
loginUser, "project_test1", 46, 2); loginUser, "project_test1", 46, ReleaseState.getEnum(2));
Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, failRes.get(Constants.STATUS)); Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR, failRes.get(Constants.STATUS));
//FIXME has function exit code 1 when exception //FIXME has function exit code 1 when exception

11
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectServiceTest.java

@ -32,6 +32,7 @@ import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectUserMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectUserMapper;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -319,9 +320,8 @@ public class ProjectServiceTest {
@Test @Test
public void testQueryAllProjectList() { public void testQueryAllProjectList() {
Mockito.when(processDefinitionMapper.listProjectIds()).thenReturn(getProjectIds());
Mockito.when(projectMapper.selectList(null)).thenReturn(getList()); Mockito.when(projectMapper.selectBatchIds(getProjectIds())).thenReturn(getList());
Mockito.when(processDefinitionMapper.selectList(null)).thenReturn(getProcessDefinitions());
Map<String, Object> result = projectService.queryAllProjectList(); Map<String, Object> result = projectService.queryAllProjectList();
logger.info(result.toString()); logger.info(result.toString());
@ -387,6 +387,11 @@ public class ProjectServiceTest {
return list; return list;
} }
private List<Integer> getProjectIds() {
return Collections.singletonList(1);
}
private String getDesc() { private String getDesc() {
return "projectUserMapper.deleteProjectRelation(projectId,userId)projectUserMappe" return "projectUserMapper.deleteProjectRelation(projectId,userId)projectUserMappe"
+ ".deleteProjectRelation(projectId,userId)projectUserMappe" + ".deleteProjectRelation(projectId,userId)projectUserMappe"

6
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.java

@ -138,4 +138,10 @@ public interface ProcessDefinitionMapper extends BaseMapper<ProcessDefinition> {
* @param version version * @param version version
*/ */
void updateVersionByProcessDefinitionId(@Param("processDefinitionId") int processDefinitionId, @Param("version") long version); void updateVersionByProcessDefinitionId(@Param("processDefinitionId") int processDefinitionId, @Param("version") long version);
/**
* list all project ids
* @return project ids list
*/
List<Integer> listProjectIds();
} }

6
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.xml

@ -128,6 +128,12 @@
WHERE user_id = #{userId} and release_state = 1 and resource_ids is not null and resource_ids != '' WHERE user_id = #{userId} and release_state = 1 and resource_ids is not null and resource_ids != ''
</select> </select>
<select id="listProjectIds" resultType="java.lang.Integer">
SELECT DISTINCT(project_id) as project_id
FROM t_ds_process_definition
</select>
<update id="updateVersionByProcessDefinitionId"> <update id="updateVersionByProcessDefinitionId">
update t_ds_process_definition update t_ds_process_definition
set version = #{version} set version = #{version}

8
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapperTest.java

@ -366,4 +366,12 @@ public class ProcessDefinitionMapperTest {
ProcessDefinition processDefinition1 = processDefinitionMapper.selectById(processDefinition.getId()); ProcessDefinition processDefinition1 = processDefinitionMapper.selectById(processDefinition.getId());
Assert.assertEquals(expectedVersion, processDefinition1.getVersion()); Assert.assertEquals(expectedVersion, processDefinition1.getVersion());
} }
@Test
public void listProjectIds() {
ProcessDefinition processDefinition = insertOne();
List<Integer> projectIds = processDefinitionMapper.listProjectIds();
Assert.assertNotNull(projectIds);
}
} }

4
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/udp/udp.vue

@ -76,7 +76,7 @@
<div class="submit"> <div class="submit">
<template v-if="router.history.current.name === 'projects-definition-details'"> <template v-if="router.history.current.name === 'projects-definition-details'">
<div class="lint-pt"> <div class="lint-pt">
<el-checkbox v-model="releaseState" size="small" :false-label="0" :true-label="1">{{$t('Whether to go online the process definition')}}</el-checkbox> <el-checkbox v-model="releaseState" size="small" :false-label="'OFFLINE'" :true-label="'ONLINE'">{{$t('Whether to go online the process definition')}}</el-checkbox>
</div> </div>
</template> </template>
<template v-if="router.history.current.name === 'projects-instance-details'"> <template v-if="router.history.current.name === 'projects-instance-details'">
@ -112,7 +112,7 @@
// Global custom parameters // Global custom parameters
udpListCache: [], udpListCache: [],
// Whether to go online the process definition // Whether to go online the process definition
releaseState: 1, releaseState: 'ONLINE',
// Whether to update the process definition // Whether to update the process definition
syncDefine: true, syncDefine: true,
// Timeout alarm // Timeout alarm

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue

@ -276,7 +276,7 @@
_downline (item) { _downline (item) {
this._upProcessState({ this._upProcessState({
processId: item.id, processId: item.id,
releaseState: 0 releaseState: 'OFFLINE'
}) })
}, },
/** /**
@ -285,7 +285,7 @@
_poponline (item) { _poponline (item) {
this._upProcessState({ this._upProcessState({
processId: item.id, processId: item.id,
releaseState: 1 releaseState: 'ONLINE'
}) })
}, },
/** /**

2
dolphinscheduler-ui/src/js/conf/home/store/dag/state.js

@ -46,7 +46,7 @@ export default {
// Current project // Current project
projectName: projectName || '', projectName: projectName || '',
// Whether to go online the process definition // Whether to go online the process definition
releaseState: 1, releaseState: 'ONLINE',
// Whether to update the process definition // Whether to update the process definition
syncDefine: true, syncDefine: true,
// tasks processList // tasks processList

Loading…
Cancel
Save