Loading .gitignore +0 −1 Original line number Diff line number Diff line Loading @@ -145,6 +145,5 @@ dolphinscheduler-ui/dist/js/home/index.78a5d12.js.map dolphinscheduler-ui/dist/js/login/index.291b8e3.js dolphinscheduler-ui/dist/js/login/index.291b8e3.js.map dolphinscheduler-ui/dist/lib/external/ dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue /dolphinscheduler-dao/src/main/resources/dao/data_source.properties dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/utils/ExcelUtils.java +5 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.*; Loading Loading @@ -102,7 +103,11 @@ public class ExcelUtils { for (int i = 0; i < headerList.size(); i++) { sheet.setColumnWidth(i, headerList.get(i).length() * 800); } File file = new File(xlsFilePath); if (!file.exists()) { file.mkdirs(); } //setting file output Loading dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/utils/ExcelUtilsTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -89,4 +89,14 @@ public class ExcelUtilsTest { ExcelUtils.genExcelFile(incorrectContent1, title, xlsFilePath); } /** * Test GenExcelFile (check directory) */ @Test public void testGenExcelFileByCheckDir() { ExcelUtils.genExcelFile("[{\"a\": \"a\"},{\"a\": \"a\"}]", "t", "/tmp/xls"); File file = new File("/tmp/xls" + Constants.SINGLE_SLASH + "t" + Constants.EXCEL_SUFFIX_XLS); file.delete(); } } No newline at end of file dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java +3 −2 Original line number Diff line number Diff line Loading @@ -453,7 +453,7 @@ public class ExecutorService extends BaseService{ TaskDependType nodeDep, FailureStrategy failureStrategy, String startNodeList, String schedule, WarningType warningType, int excutorId, int warningGroupId, RunMode runMode,Priority processInstancePriority, int workerGroupId) throws ParseException { RunMode runMode,Priority processInstancePriority, int workerGroupId){ /** * instantiate command schedule instance Loading Loading @@ -496,6 +496,7 @@ public class ExecutorService extends BaseService{ } } // determine whether to complement if(commandType == CommandType.COMPLEMENT_DATA){ runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode; if(null != start && null != end && start.before(end)){ Loading Loading @@ -540,7 +541,7 @@ public class ExecutorService extends BaseService{ processDefineId, schedule); } }else{ command.setCommandParam(JSONUtils.toJson(cmdParam)); return processService.createCommand(command); } Loading dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java +4 −5 Original line number Diff line number Diff line Loading @@ -307,20 +307,19 @@ public class ProcessDefinitionService extends BaseDAGService { if ((checkProcessJson.get(Constants.STATUS) != Status.SUCCESS)) { return checkProcessJson; } ProcessDefinition processDefinition = processService.findProcessDefineById(id); if (processDefinition == null) { ProcessDefinition processDefine = processService.findProcessDefineById(id); if (processDefine == null) { // check process definition exists putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, id); return result; } else if (processDefinition.getReleaseState() == ReleaseState.ONLINE) { } else if (processDefine.getReleaseState() == ReleaseState.ONLINE) { // online can not permit edit putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefinition.getName()); putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefine.getName()); return result; } else { putMsg(result, Status.SUCCESS); } ProcessDefinition processDefine = processService.findProcessDefineById(id); Date now = new Date(); processDefine.setId(id); Loading Loading
.gitignore +0 −1 Original line number Diff line number Diff line Loading @@ -145,6 +145,5 @@ dolphinscheduler-ui/dist/js/home/index.78a5d12.js.map dolphinscheduler-ui/dist/js/login/index.291b8e3.js dolphinscheduler-ui/dist/js/login/index.291b8e3.js.map dolphinscheduler-ui/dist/lib/external/ dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue /dolphinscheduler-dao/src/main/resources/dao/data_source.properties
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/utils/ExcelUtils.java +5 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.*; Loading Loading @@ -102,7 +103,11 @@ public class ExcelUtils { for (int i = 0; i < headerList.size(); i++) { sheet.setColumnWidth(i, headerList.get(i).length() * 800); } File file = new File(xlsFilePath); if (!file.exists()) { file.mkdirs(); } //setting file output Loading
dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/utils/ExcelUtilsTest.java +10 −0 Original line number Diff line number Diff line Loading @@ -89,4 +89,14 @@ public class ExcelUtilsTest { ExcelUtils.genExcelFile(incorrectContent1, title, xlsFilePath); } /** * Test GenExcelFile (check directory) */ @Test public void testGenExcelFileByCheckDir() { ExcelUtils.genExcelFile("[{\"a\": \"a\"},{\"a\": \"a\"}]", "t", "/tmp/xls"); File file = new File("/tmp/xls" + Constants.SINGLE_SLASH + "t" + Constants.EXCEL_SUFFIX_XLS); file.delete(); } } No newline at end of file
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ExecutorService.java +3 −2 Original line number Diff line number Diff line Loading @@ -453,7 +453,7 @@ public class ExecutorService extends BaseService{ TaskDependType nodeDep, FailureStrategy failureStrategy, String startNodeList, String schedule, WarningType warningType, int excutorId, int warningGroupId, RunMode runMode,Priority processInstancePriority, int workerGroupId) throws ParseException { RunMode runMode,Priority processInstancePriority, int workerGroupId){ /** * instantiate command schedule instance Loading Loading @@ -496,6 +496,7 @@ public class ExecutorService extends BaseService{ } } // determine whether to complement if(commandType == CommandType.COMPLEMENT_DATA){ runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode; if(null != start && null != end && start.before(end)){ Loading Loading @@ -540,7 +541,7 @@ public class ExecutorService extends BaseService{ processDefineId, schedule); } }else{ command.setCommandParam(JSONUtils.toJson(cmdParam)); return processService.createCommand(command); } Loading
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionService.java +4 −5 Original line number Diff line number Diff line Loading @@ -307,20 +307,19 @@ public class ProcessDefinitionService extends BaseDAGService { if ((checkProcessJson.get(Constants.STATUS) != Status.SUCCESS)) { return checkProcessJson; } ProcessDefinition processDefinition = processService.findProcessDefineById(id); if (processDefinition == null) { ProcessDefinition processDefine = processService.findProcessDefineById(id); if (processDefine == null) { // check process definition exists putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, id); return result; } else if (processDefinition.getReleaseState() == ReleaseState.ONLINE) { } else if (processDefine.getReleaseState() == ReleaseState.ONLINE) { // online can not permit edit putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefinition.getName()); putMsg(result, Status.PROCESS_DEFINE_NOT_ALLOWED_EDIT, processDefine.getName()); return result; } else { putMsg(result, Status.SUCCESS); } ProcessDefinition processDefine = processService.findProcessDefineById(id); Date now = new Date(); processDefine.setId(id); Loading