Authored by jimi.ji

add 回滚

@@ -278,7 +278,7 @@ public class DockerBuildCtrl { @@ -278,7 +278,7 @@ public class DockerBuildCtrl {
278 Map<String, String> map = new HashMap<>(); 278 Map<String, String> map = new HashMap<>();
279 map.put("projectId", projectId); 279 map.put("projectId", projectId);
280 map.put("environment", environment); 280 map.put("environment", environment);
281 - return httpRestClient.defaultGet("/dockerProject/getRollbackList", String.class, map); 281 + return httpRestClient.defaultGet("/dockerProject/getDeployImageList", String.class, map);
282 } catch (Exception ex) { 282 } catch (Exception ex) {
283 return "failed"; 283 return "failed";
284 } 284 }
@@ -288,18 +288,12 @@ public class DockerBuildCtrl { @@ -288,18 +288,12 @@ public class DockerBuildCtrl {
288 **/ 288 **/
289 @RequestMapping(value = "/rollback") 289 @RequestMapping(value = "/rollback")
290 @ResponseBody 290 @ResponseBody
291 - public BaseResponse deployByImageStore(String workId,String project_id, String environment_name, String clusters_name,String rollbackImageStore,String deployOrRollback){ 291 + public BaseResponse deployByImageStore(String project_id, String environment_name, String rollbackImageStore,String workId){
292 Map<String, String> map = new HashMap<>(); 292 Map<String, String> map = new HashMap<>();
293 map.put("workId", workId); 293 map.put("workId", workId);
294 map.put("projectId", project_id); 294 map.put("projectId", project_id);
295 map.put("environment", environment_name); 295 map.put("environment", environment_name);
296 - map.put("clusters_name", clusters_name);  
297 map.put("rollbackImageStore", rollbackImageStore); 296 map.put("rollbackImageStore", rollbackImageStore);
298 - if(StringUtils.isBlank(deployOrRollback)){  
299 - map.put("operateType", "rollback");  
300 - }else{  
301 - map.put("operateType", deployOrRollback);  
302 - }  
303 return httpRestClient.defaultGet(HttpUriContants.DOCKER_DEPLOY_ROLLBACK_BY_IMAGE, BaseResponse.class, map); 297 return httpRestClient.defaultGet(HttpUriContants.DOCKER_DEPLOY_ROLLBACK_BY_IMAGE, BaseResponse.class, map);
304 } 298 }
305 299
@@ -352,7 +346,7 @@ public class DockerBuildCtrl { @@ -352,7 +346,7 @@ public class DockerBuildCtrl {
352 } 346 }
353 }); 347 });
354 }*/ 348 }*/
355 - return deployByImageStore(workid_name,project_id,environment_name,clusters_name,image_file_name,"deploy"); 349 +// return deployByImageStore(workid_name,project_id,environment_name,clusters_name,image_file_name,"deploy");
356 } 350 }
357 DockerJenkinsReq dockerJenkinsReq=new DockerJenkinsReq(); 351 DockerJenkinsReq dockerJenkinsReq=new DockerJenkinsReq();
358 dockerJenkinsReq.setUserName(userName); 352 dockerJenkinsReq.setUserName(userName);
@@ -817,14 +817,10 @@ @@ -817,14 +817,10 @@
817 $("#confirmBtn").attr("disabled","disabled"); 817 $("#confirmBtn").attr("disabled","disabled");
818 $("#cancelBtn").attr("disabled","disabled"); 818 $("#cancelBtn").attr("disabled","disabled");
819 var param={}; 819 var param={};
820 - param.operate_name=$("input[name='operate_name']").val();  
821 param.project_id=$("input[name='project_id']").val(); 820 param.project_id=$("input[name='project_id']").val();
822 - param.project_name=$("input[name='project_name']").val();  
823 param.environment_name=$("input[name='environment_name']").val(); 821 param.environment_name=$("input[name='environment_name']").val();
824 - param.rollbackImageStore=$("input[name='rollbackfile_name']").val();  
825 - param.workid_name=$("input[name='workid_name']").val();  
826 - param.clusters_name=$("input[name='clusters_name']").val();  
827 - param.clusters_text=$("input[name='clusters_text']").val(); 822 + param.rollbackImageStore=$("input[name='image_file_name']").val();
  823 + param.workId=$("input[name='workid_name']").val();
828 824
829 $.ajax({ 825 $.ajax({
830 url: contextPath + "dockerBuild/rollback", 826 url: contextPath + "dockerBuild/rollback",