Browse Source

remove the operation resume_from_forced_success

pull/3/MERGE
chengshiwen 4 years ago
parent
commit
5f39792c66
  1. 3
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/ExecuteType.java
  2. 5
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
  3. 32
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java
  4. 33
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorService2Test.java
  5. 4
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CommandType.java
  6. 11
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java
  7. 8
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.java
  8. 23
      dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.xml
  9. 51
      dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java
  10. 2
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
  11. 2
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/AlertManager.java
  12. 86
      dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
  13. 4
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js
  14. 37
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue
  15. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  16. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

3
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/ExecuteType.java

@ -29,9 +29,8 @@ public enum ExecuteType {
* 3 resume failure
* 4 stop
* 5 pause
* 6 resume from forced success
*/
NONE, REPEAT_RUNNING, RECOVER_SUSPENDED_PROCESS, START_FAILURE_TASK_PROCESS, STOP, PAUSE, RESUME_FROM_FORCED_SUCCESS;
NONE, REPEAT_RUNNING, RECOVER_SUSPENDED_PROCESS, START_FAILURE_TASK_PROCESS, STOP, PAUSE;
public static ExecuteType getEnum(int value){

5
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java

@ -195,10 +195,10 @@ public enum Status {
QUERY_WORKFLOW_LINEAGE_ERROR(10161, "query workflow lineage error", "查询血缘失败"),
QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR(10162, "query authorized and user created project error error", "查询授权的和用户创建的项目错误"),
DELETE_PROCESS_DEFINITION_BY_ID_FAIL(10163,"delete process definition by id fail, for there are {0} process instances in executing using it", "删除工作流定义失败,有[{0}]个运行中的工作流实例正在使用"),
CHECK_TENANT_CODE_ERROR(10164, "Please enter the English tenant code", "请输入英文租户编码"),
CHECK_OS_TENANT_CODE_ERROR(10164, "Please enter the English tenant code", "请输入英文租户编码"),
FORCE_TASK_SUCCESS_ERROR(10165, "force task success error", "强制成功任务实例错误"),
TASK_INSTANCE_STATE_OPERATION_ERROR(10166, "the status of task instance {0} is {1},Cannot perform force success operation", "任务实例[{0}]的状态是[{1}],无法执行强制成功操作"),
UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found", "UDF函数不存在"),
UDF_FUNCTION_EXISTS(20002, "UDF function already exists", "UDF函数已存在"),
@ -252,7 +252,6 @@ public enum Status {
EXPORT_PROCESS_DEFINE_BY_ID_ERROR(50028, "export process definition by id error", "导出工作流定义错误"),
BATCH_EXPORT_PROCESS_DEFINE_BY_IDS_ERROR(50028,"batch export process definition by ids error", "批量导出工作流定义错误"),
IMPORT_PROCESS_DEFINE_ERROR(50029, "import process definition error", "导入工作流定义错误"),
NO_VALID_FORCED_SUCCESS_TASK(50030, "there is no valid forced success node in process instance {0}", "工作流实例[{0}]中不包含有效的强制成功的任务实例"),
HDFS_NOT_STARTUP(60001, "hdfs not startup", "hdfs未启用"),

32
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java

@ -33,7 +33,6 @@ import org.apache.dolphinscheduler.common.enums.Priority;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.enums.RunMode;
import org.apache.dolphinscheduler.common.enums.TaskDependType;
import org.apache.dolphinscheduler.common.enums.TaskType;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.model.Server;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
@ -284,13 +283,6 @@ public class ExecutorService extends BaseService {
result = updateProcessInstancePrepare(processInstance, CommandType.PAUSE, ExecutionStatus.READY_PAUSE);
}
break;
case RESUME_FROM_FORCED_SUCCESS:
if (!this.checkValidForcedSuccessTask(processInstanceId)) {
putMsg(result, Status.NO_VALID_FORCED_SUCCESS_TASK, processInstance.getName());
} else {
result = insertCommand(loginUser, processInstanceId, processDefinition.getId(), CommandType.RESUME_FROM_FORCED_SUCCESS);
}
break;
default:
logger.error("unknown execute type : {}", executeType);
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "unknown execute type");
@ -338,7 +330,6 @@ public class ExecutorService extends BaseService {
}
break;
case START_FAILURE_TASK_PROCESS:
case RESUME_FROM_FORCED_SUCCESS:
if (executionStatus.typeIsFailure()) {
checkResult = true;
}
@ -618,27 +609,4 @@ public class ExecutorService extends BaseService {
}
return null;
}
/**
* check if the process instance contains valid forced success task
*
* @param processInstanceId
* @return
*/
private boolean checkValidForcedSuccessTask(int processInstanceId) {
List<Integer> forcedSuccessList = processService.findTaskIdByInstanceState(processInstanceId, ExecutionStatus.FORCED_SUCCESS);
if (forcedSuccessList != null && !forcedSuccessList.isEmpty()) {
return true;
}
List<Integer> failedSubList = processService.findTaskIdByInstanceStatusAndType(processInstanceId,
new ExecutionStatus[]{ExecutionStatus.FAILURE, ExecutionStatus.KILL, ExecutionStatus.NEED_FAULT_TOLERANCE},
TaskType.SUB_PROCESS);
for (int i = 0; i < failedSubList.size(); i++) {
if (processService.haveForcedSuccessInSubProcess(failedSubList.get(i))) {
return true;
}
}
return false;
}
}

33
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ExecutorService2Test.java

@ -275,39 +275,6 @@ public class ExecutorService2Test {
}
@Test
public void testExecute() {
List<Integer> mockRes = new ArrayList<>();
mockRes.add(1);
mockRes.add(2);
Mockito.when(processService.verifyIsNeedCreateCommand(any(Command.class)))
.thenReturn(true);
// check execute type error
processInstance.setState(ExecutionStatus.SUCCESS);
Map<String, Object> checkExeTypeRes = executorService.execute(loginUser, projectName, processInstanceId, ExecuteType.RESUME_FROM_FORCED_SUCCESS);
Assert.assertEquals(Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, checkExeTypeRes.get(Constants.STATUS));
// no valid forced success task
processInstance.setState(ExecutionStatus.FAILURE);
Map<String, Object> noValidTaskRes = executorService.execute(loginUser, projectName, processInstanceId, ExecuteType.RESUME_FROM_FORCED_SUCCESS);
Assert.assertEquals(Status.NO_VALID_FORCED_SUCCESS_TASK, noValidTaskRes.get(Constants.STATUS));
// have forced success in sub-process
Mockito.when(processService.findTaskIdByInstanceStatusAndType(anyInt(), any(ExecutionStatus[].class), any(TaskType.class)))
.thenReturn(mockRes);
Mockito.when(processService.haveForcedSuccessInSubProcess(anyInt()))
.thenReturn(true);
Map<String, Object> successRes1 = executorService.execute(loginUser, projectName, processInstanceId, ExecuteType.RESUME_FROM_FORCED_SUCCESS);
Assert.assertEquals(Status.SUCCESS, successRes1.get(Constants.STATUS));
// test success
Mockito.when(processService.findTaskIdByInstanceState(processInstanceId, ExecutionStatus.FORCED_SUCCESS)).thenReturn(mockRes);
Map<String, Object> successRes = executorService.execute(loginUser, projectName, processInstanceId, ExecuteType.RESUME_FROM_FORCED_SUCCESS);
Assert.assertEquals(Status.SUCCESS, successRes.get(Constants.STATUS));
verify(processService, times(2)).createCommand(any(Command.class));
}
private List<Server> getMasterServersList() {
List<Server> masterServerList = new ArrayList<>();
Server masterServer1 = new Server();

4
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CommandType.java

@ -39,7 +39,6 @@ public enum CommandType {
* 8 pause a process
* 9 stop a process
* 10 recover waiting thread
* 11 resume process from forced-success task nodes
*/
START_PROCESS(0, "start a new process"),
START_CURRENT_TASK_PROCESS(1, "start a new process from current nodes"),
@ -51,8 +50,7 @@ public enum CommandType {
REPEAT_RUNNING(7, "repeat running a process"),
PAUSE(8, "pause a process"),
STOP(9, "stop a process"),
RECOVER_WAITTING_THREAD(10, "recover waiting thread"),
RESUME_FROM_FORCED_SUCCESS(11, "resume process from forced-success task nodes");
RECOVER_WAITTING_THREAD(10, "recover waiting thread");
CommandType(int code, String descp){
this.code = code;

11
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/placeholder/BusinessTimeUtils.java

@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.utils.placeholder;
import org.apache.dolphinscheduler.common.Constants;
@ -29,15 +28,14 @@ import static org.apache.dolphinscheduler.common.Constants.PARAMETER_FORMAT_TIME
import static org.apache.dolphinscheduler.common.utils.DateUtils.format;
import static org.apache.commons.lang.time.DateUtils.addDays;
/**
* business time utils
*/
public class BusinessTimeUtils {
private BusinessTimeUtils() {
throw new IllegalStateException("BusinessTimeUtils class");
}
/**
* get business time in parameters by different command types
*
@ -56,12 +54,13 @@ public class BusinessTimeUtils {
case RECOVER_SUSPENDED_PROCESS:
case START_FAILURE_TASK_PROCESS:
case REPEAT_RUNNING:
case RESUME_FROM_FORCED_SUCCESS:
case SCHEDULER:
default:
businessDate = addDays(new Date(), -1);
if (runTime != null) {
// If there is a scheduled time, take the scheduling time. Recovery from failed nodes, suspension of recovery, re-run for scheduling
if (runTime != null){
/**
* If there is a scheduled time, take the scheduling time. Recovery from failed nodes, suspension of recovery, re-run for scheduling
*/
businessDate = addDays(runTime, -1);
}
break;

8
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.java

@ -72,12 +72,4 @@ public interface TaskInstanceMapper extends BaseMapper<TaskInstance> {
@Param("startTime") Date startTime,
@Param("endTime") Date endTime
);
List<Integer> queryTaskByProcessIdAndStateAndType(@Param("processInstanceId") Integer processInstanceId,
@Param("states") int[] stateArray,
@Param("taskType") String taskType);
List<Integer> queryTaskBySubProcessTaskIdAndStateAndType(@Param("subProcessTaskId") Integer subProcessTaskId,
@Param("states") int[] stateArray,
@Param("taskType") String taskType);
}

23
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.xml

@ -152,27 +152,4 @@
</if>
order by instance.start_time desc
</select>
<select id="queryTaskByProcessIdAndStateAndType" resultType="java.lang.Integer">
select id from t_ds_task_instance
where process_instance_id = #{processInstanceId}
and task_type = #{taskType}
and state in
<foreach collection="states" index="index" item="i" open="(" separator="," close=")">
#{i}
</foreach>
and flag = 1
</select>
<select id="queryTaskBySubProcessTaskIdAndStateAndType" resultType="java.lang.Integer">
select id from t_ds_task_instance
where process_instance_id =
(select process_instance_id from t_ds_relation_process_instance where parent_task_instance_id = #{subProcessTaskId})
and state in
<foreach collection="states" index="index" item="i" open="(" separator="," close=")">
#{i}
</foreach>
<if test="taskType != null">
and task_type = #{taskType}
</if>
and flag = 1
</select>
</mapper>

51
dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java

@ -26,10 +26,8 @@ import org.apache.dolphinscheduler.common.enums.TaskType;
import org.apache.dolphinscheduler.dao.entity.ExecuteStatusCount;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.ProcessInstanceMap;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -319,53 +317,4 @@ public class TaskInstanceMapperTest {
Assert.assertNotEquals(taskInstanceIPage.getTotal(), 0);
}
@Test
public void testQueryTaskByProcessIdAndStateAndType() {
// insert three task instances with the same process instance id
List<TaskInstance> taskList = new ArrayList<>();
for (int i = 0; i < 3; i++) {
String name = "ut task" + String.valueOf(i);
taskList.add(insertOne(name, 66, ExecutionStatus.FAILURE, TaskType.SUB_PROCESS.toString()));
}
// test query result
List<Integer> resultArray = taskInstanceMapper.queryTaskByProcessIdAndStateAndType(66,
new int[] {ExecutionStatus.FAILURE.ordinal(), ExecutionStatus.KILL.ordinal(), ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal()},
TaskType.SUB_PROCESS.toString());
Assert.assertEquals(3, resultArray.size());
// delete
for (int i = 0; i < 3; i++) {
taskInstanceMapper.deleteById(taskList.get(i));
}
}
@Test
public void testQueryTaskBySubProcessTaskIdAndStateAndType() {
TaskInstance parentTask = insertOne("parent-task", 66, ExecutionStatus.FAILURE, TaskType.SUB_PROCESS.toString());
ProcessInstanceMap processInstanceMap = new ProcessInstanceMap();
processInstanceMap.setParentProcessInstanceId(66);
processInstanceMap.setParentTaskInstanceId(parentTask.getId());
processInstanceMap.setProcessInstanceId(67);
processInstanceMapMapper.insert(processInstanceMap);
TaskInstance subTask1 = insertOne("sub1", 67, ExecutionStatus.SUCCESS, TaskType.SHELL.toString());
TaskInstance subTask2 = insertOne("sub2", 67, ExecutionStatus.FORCED_SUCCESS, TaskType.SHELL.toString());
// test query result
List<Integer> resultList = taskInstanceMapper.queryTaskBySubProcessTaskIdAndStateAndType(parentTask.getId(),
new int[] {ExecutionStatus.FORCED_SUCCESS.ordinal()},
null);
Assert.assertEquals(1, resultList.size());
Assert.assertEquals(subTask2.getId(), resultList.get(0).intValue());
// delete
taskInstanceMapper.deleteById(parentTask.getId());
processInstanceMapMapper.deleteById(processInstanceMap.getId());
taskInstanceMapper.deleteById(subTask1.getId());
taskInstanceMapper.deleteById(subTask2.getId());
}
}

2
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

@ -414,7 +414,7 @@ public class MasterExecThread implements Runnable {
if (task.isConditionsTask() || DagHelper.haveConditionsAfterNode(task.getName(), dag)) {
continue;
}
if (task.getState().typeIsFailure() && !task.taskCanRetry() && !task.isConditionsTask()) {
if (task.getState().typeIsFailure() && !task.taskCanRetry()) {
errorTaskList.put(task.getName(), task);
}
}

2
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/AlertManager.java

@ -81,8 +81,6 @@ public class AlertManager {
return "pause";
case STOP:
return "stop";
case RESUME_FROM_FORCED_SUCCESS:
return "resume from forced success";
default:
return "unknown type";
}

86
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java

@ -37,7 +37,6 @@ import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.ResourceType;
import org.apache.dolphinscheduler.common.enums.TaskDependType;
import org.apache.dolphinscheduler.common.enums.TaskType;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.model.DateInterval;
import org.apache.dolphinscheduler.common.model.TaskNode;
@ -263,7 +262,6 @@ public class ProcessService {
cmdTypeMap.put(CommandType.REPEAT_RUNNING, 1);
cmdTypeMap.put(CommandType.RECOVER_SUSPENDED_PROCESS, 1);
cmdTypeMap.put(CommandType.START_FAILURE_TASK_PROCESS, 1);
cmdTypeMap.put(CommandType.RESUME_FROM_FORCED_SUCCESS, 1);
CommandType commandType = command.getCommandType();
if (cmdTypeMap.containsKey(commandType)) {
@ -710,6 +708,7 @@ public class ProcessService {
List<Integer> failedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE);
List<Integer> toleranceList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE);
List<Integer> killedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL);
// List<Integer> forcedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FORCED_SUCCESS);
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);
failedList.addAll(killedList);
@ -774,31 +773,6 @@ public class ProcessService {
break;
case SCHEDULER:
break;
case RESUME_FROM_FORCED_SUCCESS:
List<Integer> failedSubList = this.findTaskIdByInstanceStatusAndType(processInstance.getId(),
new ExecutionStatus[]{ExecutionStatus.FAILURE, ExecutionStatus.KILL, ExecutionStatus.NEED_FAULT_TOLERANCE},
TaskType.SUB_PROCESS);
for (int i = 0; i < failedSubList.size(); i++) {
// if there exists forced success in the sub_process
if (haveForcedSuccessInSubProcess(failedSubList.get(i))) {
// change sub_process task's state into submitted_success
TaskInstance taskInstance = this.findTaskInstanceById(failedSubList.get(i));
taskInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS);
updateTaskInstance(taskInstance);
}
}
/**
* set resume node list to null
* 1. we can have a complete dag in the ExecThread so that it can restore the previous context
* 2. each time the operation is done the state of process will be reasonable as usual
*/
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);
cmdParam.put(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING,
String.join(Constants.COMMA, convertIntListToString(null)));
processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam));
processInstance.setRunTimes(runTime + 1);
break;
default:
break;
}
@ -806,30 +780,6 @@ public class ProcessService {
return processInstance;
}
/**
* recursively check if a sub process node contains forced success node
* @param taskInstanceId task instance id
* @return true or false
*/
public boolean haveForcedSuccessInSubProcess(int taskInstanceId) {
List<Integer> forcedSuccessList = this.findTaskIdInSubProcessByStatusAndType(taskInstanceId,
new ExecutionStatus[]{ExecutionStatus.FORCED_SUCCESS},
null);
if (forcedSuccessList != null && !forcedSuccessList.isEmpty()) {
return true;
}
List<Integer> childSubList = this.findTaskIdInSubProcessByStatusAndType(taskInstanceId,
new ExecutionStatus[]{ExecutionStatus.FAILURE, ExecutionStatus.KILL, ExecutionStatus.NEED_FAULT_TOLERANCE},
TaskType.SUB_PROCESS);
for (Integer child : childSubList) {
if (haveForcedSuccessInSubProcess(child)) {
return true;
}
}
return false;
}
/**
* return complement data if the process start with complement data
*
@ -1413,40 +1363,6 @@ public class ProcessService {
return taskInstanceMapper.queryTaskByProcessIdAndState(instanceId, state.ordinal());
}
/**
* get id list by task state and type
* @param processInstanceId process instance id
* @param states task instance state array
* @param taskType task type
* @return task instance id list
*/
public List<Integer> findTaskIdByInstanceStatusAndType(int processInstanceId, ExecutionStatus[] states, TaskType taskType) {
int[] statesArray = new int[states.length];
for (int i = 0; i < states.length; i++) {
statesArray[i] = states[i].ordinal();
}
return taskInstanceMapper.queryTaskByProcessIdAndStateAndType(processInstanceId, statesArray, taskType.toString());
}
/**
* get tasks in sub_process by sub_process task id and state and type
* if param type is null, it queries all types
* @param taskId task instance id
* @param states task instance state array
* @param taskType task type
* @return task instance id list
*/
public List<Integer> findTaskIdInSubProcessByStatusAndType(int taskId, ExecutionStatus[] states, TaskType taskType) {
int[] statesArray = new int[states.length];
for (int i = 0; i < states.length; i++) {
statesArray[i] = states[i].ordinal();
}
if (taskType == null) {
return taskInstanceMapper.queryTaskBySubProcessTaskIdAndStateAndType(taskId, statesArray, null);
}
return taskInstanceMapper.queryTaskBySubProcessTaskIdAndStateAndType(taskId, statesArray, taskType.toString());
}
/**
* find valid task list by process definition id
*

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

@ -133,10 +133,6 @@ const runningType = [
{
desc: `${i18n.$t('Recovery waiting thread')}`,
code: 'RECOVER_WAITTING_THREAD'
},
{
desc: `${i18n.$t('Resume from forced success')}`,
code: 'RESUME_FROM_FORCED_SUCCESS'
}
]

37
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue

@ -61,7 +61,7 @@
<el-table-column prop="recovery" :label="$t('fault-tolerant sign')"></el-table-column>
<el-table-column prop="executorName" :label="$t('Executor')"></el-table-column>
<el-table-column prop="host" :label="$t('host')" width="150"></el-table-column>
<el-table-column :label="$t('Operation')" width="270" fixed="right">
<el-table-column :label="$t('Operation')" width="240" fixed="right">
<template slot-scope="scope">
<div v-show="scope.row.disabled">
<el-tooltip :content="$t('Edit')" placement="top" :enterable="false">
@ -77,11 +77,6 @@
<el-button type="success" size="mini" icon="el-icon-circle-close" :disabled="scope.row.state !== 'FAILURE'" @click="_restore(scope.row,scope.$index)" circle></el-button>
</span>
</el-tooltip>
<el-tooltip :content="$t('Resume Forced Success')" placement="top" :enterable="false">
<span>
<el-button type="success" size="mini" icon="el-icon-stopwatch" :disabled="!(scope.row.state === 'FAILURE' || scope.row.state === 'NEED_FAULT_TOLERANCE' || scope.row.state === 'KILL')" @click="_resumeFromForcedSuccess(scope.row,scope.$index)" circle></el-button>
</span>
</el-tooltip>
<el-tooltip :content="scope.row.state === 'STOP' ? $t('Recovery Suspend') : $t('Stop')" placement="top" :enterable="false">
<span><el-button type="warning" size="mini" :disabled="scope.row.state !== 'RUNNING_EXECUTION' && scope.row.state !== 'STOP'" :icon="scope.row.state === 'STOP' ? 'el-icon-video-play' : 'el-icon-close'" @click="_stop(scope.row,scope.$index)" circle></el-button></span>
</el-tooltip>
@ -154,24 +149,6 @@
disabled="true">
</el-button>
<!--Resume from forced success-->
<el-button
v-show="buttonType === 'forced'"
type="success"
size="mini"
circle
disabled="true">
<span style="padding: 0 3px">{{scope.row.count}}</span>
</el-button>
<el-button
v-show="buttonType !== 'forced'"
type="success"
size="mini"
circle
icon="el-icon-stopwatch"
disabled="true">
</el-button>
<!--Recovery Suspend/Pause-->
<span>
<el-button
@ -358,18 +335,6 @@
})
}
},
/**
* Resume from forced success
* @param RESUME_FROM_FORCED_SUCCESS
*/
_resumeFromForcedSuccess (item, index) {
this._countDownFn({
id: item.id,
executeType: 'RESUME_FROM_FORCED_SUCCESS',
index: index,
buttonType: 'forced'
})
},
/**
* pause
* @param PAUSE

2
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -283,7 +283,6 @@ export default {
Stop: 'Stop',
Pause: 'Pause',
'Recovery Suspend': 'Recovery Suspend',
'Resume Forced Success': 'Resume Forced Success',
Gantt: 'Gantt',
Name: 'Name',
'Node Type': 'Node Type',
@ -338,7 +337,6 @@ export default {
'Complement Data': 'Complement Data',
'Scheduling execution': 'Scheduling execution',
'Recovery waiting thread': 'Recovery waiting thread',
'Resume from forced success': 'Resume from forced success',
'Submitted successfully': 'Submitted successfully',
Executing: 'Executing',
'Ready to pause': 'Ready to pause',

2
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -282,7 +282,6 @@ export default {
Stop: '停止',
Pause: '暂停',
'Recovery Suspend': '恢复运行',
'Resume Forced Success': '从强制成功处继续',
Gantt: '甘特图',
Name: '名称',
'Node Type': '节点类型',
@ -337,7 +336,6 @@ export default {
'Complement Data': '补数',
'Scheduling execution': '调度执行',
'Recovery waiting thread': '恢复等待线程',
'Resume from forced success': '从强制成功处继续',
'Submitted successfully': '提交成功',
Executing: '正在执行',
'Ready to pause': '准备暂停',

Loading…
Cancel
Save