Unverified Commit 6f80e334 authored by BoYiZhang's avatar BoYiZhang Committed by GitHub
Browse files

Merge pull request #3 from apache/dev

update code 
parents ab98be17 2b0b93b9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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.*;
@@ -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
+10 −0
Original line number Diff line number Diff line
@@ -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
+3 −2
Original line number Diff line number Diff line
@@ -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
@@ -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)){
@@ -540,7 +541,7 @@ public class ExecutorService extends BaseService{
                        processDefineId, schedule);
            }
        }else{
            command.setCommandParam(JSONUtils.toJson(cmdParam));

            return processService.createCommand(command);
        }

+4 −5
Original line number Diff line number Diff line
@@ -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