|
|
|
@@ -255,7 +255,7 @@ public class ServiceServiceImpl implements ServiceService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public String getServiceVersionLog(Long id, String startTime, String endTime) { |
|
|
|
public HashMap<String, String> getServiceVersionLog(Long id, String startTime, String endTime) { |
|
|
|
ServiceVersion serviceVersion = serviceDao.getServiceVersionById(id); |
|
|
|
HashMap<String, Object> paramMap = new HashMap<>(); |
|
|
|
paramMap.put("deployment_name", serviceVersion.getDeploymentName()); |
|
|
|
@@ -264,8 +264,14 @@ public class ServiceServiceImpl implements ServiceService { |
|
|
|
String req = HttpUtils.sendPost(argoUrl + modelService + "/getLog", JSON.toJSONString(paramMap)); |
|
|
|
if (StringUtils.isNotEmpty(req)) { |
|
|
|
Map<String, Object> reqMap = JacksonUtil.parseJSONStr2Map(req); |
|
|
|
HashMap<String, String> data = (HashMap<String, String>) reqMap.get("data"); |
|
|
|
return data.get("log_content"); |
|
|
|
if (reqMap.get("code") != null && "200".equals(reqMap.get("code"))) { |
|
|
|
HashMap<String, String> data = (HashMap<String, String>) reqMap.get("data"); |
|
|
|
data.put("start_time", data.get("end_time")); |
|
|
|
data.put("end_time", endTime); |
|
|
|
return data; |
|
|
|
} else { |
|
|
|
throw new RuntimeException("获取日志失败"); |
|
|
|
} |
|
|
|
} else { |
|
|
|
throw new RuntimeException("获取日志失败"); |
|
|
|
} |
|
|
|
|