Loading escheduler-api/src/main/java/cn/escheduler/api/service/DataAnalysisService.java +12 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package cn.escheduler.api.service; import cn.escheduler.api.dto.CommandStateCount; import cn.escheduler.api.dto.DefineUserDto; import cn.escheduler.api.dto.TaskCountDto; import cn.escheduler.api.enums.Status; Loading @@ -38,10 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.MessageFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.*; /** * data analysis service Loading Loading @@ -298,7 +296,16 @@ public class DataAnalysisService { dataMap.put(errorExecutionStatus.getExecutionStatus(),errorCommandStateCountsMap); } result.put(Constants.DATA_LIST, dataMap); List<CommandStateCount> list = new ArrayList<>(); Iterator<Map.Entry<ExecutionStatus, Map<String, Integer>>> iterator = dataMap.entrySet().iterator(); while (iterator.hasNext()){ Map.Entry<ExecutionStatus, Map<String, Integer>> next = iterator.next(); CommandStateCount commandStateCount = new CommandStateCount(next.getValue().get("errorCommandState"), next.getValue().get("commandState"),next.getKey()); list.add(commandStateCount); } result.put(Constants.DATA_LIST, list); putMsg(result, Status.SUCCESS); return result; } Loading Loading
escheduler-api/src/main/java/cn/escheduler/api/service/DataAnalysisService.java +12 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package cn.escheduler.api.service; import cn.escheduler.api.dto.CommandStateCount; import cn.escheduler.api.dto.DefineUserDto; import cn.escheduler.api.dto.TaskCountDto; import cn.escheduler.api.enums.Status; Loading @@ -38,10 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.MessageFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.*; /** * data analysis service Loading Loading @@ -298,7 +296,16 @@ public class DataAnalysisService { dataMap.put(errorExecutionStatus.getExecutionStatus(),errorCommandStateCountsMap); } result.put(Constants.DATA_LIST, dataMap); List<CommandStateCount> list = new ArrayList<>(); Iterator<Map.Entry<ExecutionStatus, Map<String, Integer>>> iterator = dataMap.entrySet().iterator(); while (iterator.hasNext()){ Map.Entry<ExecutionStatus, Map<String, Integer>> next = iterator.next(); CommandStateCount commandStateCount = new CommandStateCount(next.getValue().get("errorCommandState"), next.getValue().get("commandState"),next.getKey()); list.add(commandStateCount); } result.put(Constants.DATA_LIST, list); putMsg(result, Status.SUCCESS); return result; } Loading