Authored by jimi.ji

add 回滚

... ... @@ -278,7 +278,7 @@ public class DockerBuildCtrl {
Map<String, String> map = new HashMap<>();
map.put("projectId", projectId);
map.put("environment", environment);
return httpRestClient.defaultGet("/dockerProject/getRollbackList", String.class, map);
return httpRestClient.defaultGet("/dockerProject/getDeployImageList", String.class, map);
} catch (Exception ex) {
return "failed";
}
... ... @@ -288,18 +288,12 @@ public class DockerBuildCtrl {
**/
@RequestMapping(value = "/rollback")
@ResponseBody
public BaseResponse deployByImageStore(String workId,String project_id, String environment_name, String clusters_name,String rollbackImageStore,String deployOrRollback){
public BaseResponse deployByImageStore(String project_id, String environment_name, String rollbackImageStore,String workId){
Map<String, String> map = new HashMap<>();
map.put("workId", workId);
map.put("projectId", project_id);
map.put("environment", environment_name);
map.put("clusters_name", clusters_name);
map.put("rollbackImageStore", rollbackImageStore);
if(StringUtils.isBlank(deployOrRollback)){
map.put("operateType", "rollback");
}else{
map.put("operateType", deployOrRollback);
}
return httpRestClient.defaultGet(HttpUriContants.DOCKER_DEPLOY_ROLLBACK_BY_IMAGE, BaseResponse.class, map);
}
... ... @@ -352,7 +346,7 @@ public class DockerBuildCtrl {
}
});
}*/
return deployByImageStore(workid_name,project_id,environment_name,clusters_name,image_file_name,"deploy");
// return deployByImageStore(workid_name,project_id,environment_name,clusters_name,image_file_name,"deploy");
}
DockerJenkinsReq dockerJenkinsReq=new DockerJenkinsReq();
dockerJenkinsReq.setUserName(userName);
... ...
... ... @@ -817,14 +817,10 @@
$("#confirmBtn").attr("disabled","disabled");
$("#cancelBtn").attr("disabled","disabled");
var param={};
param.operate_name=$("input[name='operate_name']").val();
param.project_id=$("input[name='project_id']").val();
param.project_name=$("input[name='project_name']").val();
param.environment_name=$("input[name='environment_name']").val();
param.rollbackImageStore=$("input[name='rollbackfile_name']").val();
param.workid_name=$("input[name='workid_name']").val();
param.clusters_name=$("input[name='clusters_name']").val();
param.clusters_text=$("input[name='clusters_text']").val();
param.rollbackImageStore=$("input[name='image_file_name']").val();
param.workId=$("input[name='workid_name']").val();
$.ajax({
url: contextPath + "dockerBuild/rollback",
... ...