Authored by mlge

1)工单object添加 uploadCDN字段;2)新建工单 增加 是否上传CDN选项;3) 工单详情 展示 CDN是否上传;

@@ -47,6 +47,9 @@ public class ReleaseWorkJob { @@ -47,6 +47,9 @@ public class ReleaseWorkJob {
47 */ 47 */
48 private String projectDeployType; 48 private String projectDeployType;
49 49
  50 + //发布方式为 git 时 肯定为0
  51 + private Integer uploadCDN;//0 --否 1--上传
  52 +
50 /** 53 /**
51 * 分支 54 * 分支
52 */ 55 */
@@ -145,6 +145,17 @@ @@ -145,6 +145,17 @@
145 </div> 145 </div>
146 </div> 146 </div>
147 147
  148 + <div class="form-group" id = "uploadCDN_div" style="display: none">
  149 + <label class="col-sm-1 control-label"><strong>上传CDN:</strong></label>
  150 + <div class="col-sm-8">
  151 + <select id="uploadCDN" name="uploadCDN" class="form-control" style="width: 300px;height:40px">
  152 + <option value="0"></option>
  153 + <option value="1"></option>
  154 + </select>
  155 + </div>
  156 +
  157 + </div>
  158 +
148 <div class="form-group"> 159 <div class="form-group">
149 <label class="col-sm-1 control-label"><strong>敏感接口:</strong></label> 160 <label class="col-sm-1 control-label"><strong>敏感接口:</strong></label>
150 <div class="col-sm-8"> 161 <div class="col-sm-8">
@@ -276,6 +287,8 @@ @@ -276,6 +287,8 @@
276 $(".deploy_type_div_class").hide(); 287 $(".deploy_type_div_class").hide();
277 $("#"+val+"_deploy_type_div").show(); 288 $("#"+val+"_deploy_type_div").show();
278 if(val=="image"){ 289 if(val=="image"){
  290 + $("#uploadCDN_div").show();//显示 上传CDN区域
  291 +
279 $("#imagesList").select2("val", ""); 292 $("#imagesList").select2("val", "");
280 $('#imagesList').select2().empty(); 293 $('#imagesList').select2().empty();
281 //加载项目的镜像 294 //加载项目的镜像
@@ -309,6 +322,10 @@ @@ -309,6 +322,10 @@
309 } 322 }
310 323
311 324
  325 + }else{
  326 + $("#uploadCDN").val(0);
  327 + $("#uploadCDN_div").hide();//隐藏当前区域
  328 +
312 } 329 }
313 } 330 }
314 331
@@ -353,6 +370,9 @@ @@ -353,6 +370,9 @@
353 } 370 }
354 371
355 function changePlatform() { 372 function changePlatform() {
  373 + $("#projectDeployType").prop("disabled", true);//下拉不可用
  374 + $('#projectDeployType').val("git").trigger('change');//触发 type改变事件
  375 +
356 //把已选的环境变量去掉 376 //把已选的环境变量去掉
357 $('input:checkbox[name=environment]').removeAttr("checked"); 377 $('input:checkbox[name=environment]').removeAttr("checked");
358 $("#environmentDiv_common").empty(); 378 $("#environmentDiv_common").empty();
@@ -725,7 +745,8 @@ @@ -725,7 +745,8 @@
725 sensitiveInterface: $("#sensitiveInterface").val(), 745 sensitiveInterface: $("#sensitiveInterface").val(),
726 testProject: testProject, 746 testProject: testProject,
727 projectType:$("input[name='projectTypes']:checked").val(), 747 projectType:$("input[name='projectTypes']:checked").val(),
728 - test: test 748 + test: test,
  749 + uploadCDN: $("#uploadCDN").val()
729 }; 750 };
730 751
731 $.ajax({ 752 $.ajax({
@@ -117,6 +117,16 @@ @@ -117,6 +117,16 @@
117 readonly="readonly"/> 117 readonly="readonly"/>
118 </div> 118 </div>
119 </div> 119 </div>
  120 + <div class="form-group">
  121 + <label class="col-sm-6 control-label"><strong>上传CDN:</strong></label>
  122 + <div class="col-sm-8">
  123 + <input type="text" class="form-control"
  124 + <c:if test="${workJob.uploadCDN == 0}">value="否"</c:if>
  125 + <c:if test="${workJob.uploadCDN == 1}">value="是"</c:if>
  126 + style='border-left:0px;border-top:0px;border-right:0px;border-bottom:1px '
  127 + readonly="readonly"/>
  128 + </div>
  129 + </div>
120 </c:when> 130 </c:when>
121 131
122 <c:otherwise> 132 <c:otherwise>