|
|
|
@@ -348,11 +348,15 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
/** |
|
|
|
* 查询实验实例日志 |
|
|
|
* |
|
|
|
* @param id 主键 |
|
|
|
* @param map Map格式的请求数据 |
|
|
|
* @return 运行日志 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public String showExperimentInsLog(Integer id) { |
|
|
|
public String showExperimentInsLog(Map<String, Object> map) { |
|
|
|
//先从map中取出数据 |
|
|
|
Integer id = (Integer) map.get("id"); |
|
|
|
String componentId = (String) map.get("component_id"); |
|
|
|
|
|
|
|
//先查出实验记录 |
|
|
|
ExperimentIns experimentIns = this.experimentInsDao.queryById(id); |
|
|
|
if (experimentIns == null) { |
|
|
|
@@ -366,9 +370,10 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { |
|
|
|
Map<String,Object> requestData = new HashMap<>(); |
|
|
|
requestData.put("namespace", namespace); |
|
|
|
requestData.put("name", name); |
|
|
|
//先写死这两个数据项 |
|
|
|
requestData.put("workflow-type","workflows"); |
|
|
|
requestData.put("artifact-name","workflows"); |
|
|
|
requestData.put("workflow-type","workflows"); |
|
|
|
requestData.put("artifact-name","main-logs"); |
|
|
|
requestData.put("component-id",componentId); |
|
|
|
// 创建发送数据map,将请求数据作为"data"键的值 |
|
|
|
Map<String,Object> res = new HashMap<>(); |
|
|
|
res.put("data", requestData); |
|
|
|
|