...
|
...
|
@@ -122,7 +122,7 @@ |
|
|
</div>
|
|
|
|
|
|
<div class="form-group" id="branch-div">
|
|
|
<label class="col-sm-1 control-label"><strong>发布方式:</strong></label>
|
|
|
<label class="col-sm-1 control-label">发布方式</label>
|
|
|
<div class="col-sm-1" style="width: 110px;" >
|
|
|
<select id="projectDeployType" name="projectDeployType">
|
|
|
<c:forEach items="${projectDeployTypes }" var="projectDeployType" varStatus="projectDeloyTypeStatus">
|
...
|
...
|
@@ -292,17 +292,34 @@ |
|
|
width:"100%"
|
|
|
});
|
|
|
|
|
|
$("#projectDeployType").prop("disabled", true);
|
|
|
|
|
|
if("${releaseWorkJob_id}".length>0){
|
|
|
$("#projectDeployType").prop("disabled", true);
|
|
|
$('#projectDeployType').val(['${releaseWorkJob_projectDeployType}']).trigger('change');
|
|
|
}
|
|
|
|
|
|
getProjects();
|
|
|
});
|
|
|
|
|
|
function deployTypeOnchange(val) {
|
|
|
function deployTypeOnchange(val,supportDeployType) {
|
|
|
$(".deploy_type_div_class").hide();
|
|
|
$("#"+val+"_deploy_type_div").show();
|
|
|
if("${releaseWorkJob_id}".length>0){
|
|
|
return ;
|
|
|
}
|
|
|
var array_deploy_type=[];
|
|
|
if(supportDeployType==null||supportDeployType.length<=0){
|
|
|
array_deploy_type.push("git");
|
|
|
}else{
|
|
|
array_deploy_type=supportDeployType.split(",");
|
|
|
}
|
|
|
if(array_deploy_type.length>1){
|
|
|
//下拉可用
|
|
|
$("#projectDeployType").prop("disabled", false);
|
|
|
}else{
|
|
|
//下拉不可以
|
|
|
$("#projectDeployType").prop("disabled", true);
|
|
|
}
|
|
|
if(val=="image"){
|
|
|
$("#imagesList").select2("val", "");
|
|
|
$('#imagesList').select2().empty();
|
...
|
...
|
@@ -338,11 +355,11 @@ |
|
|
}
|
|
|
}
|
|
|
|
|
|
function reloadDeployImage(){
|
|
|
function reloadDeployImage(supportDeployType){
|
|
|
if("${releaseWorkJob_id}".length>0){
|
|
|
return ;
|
|
|
}
|
|
|
deployTypeOnchange($("#projectDeployType").val());
|
|
|
deployTypeOnchange($("#projectDeployType").val(),supportDeployType);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -382,7 +399,7 @@ |
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
var obj = eval("(" + data + ")");
|
|
|
if ("Deploy" == operate) {//发布多选框
|
|
|
if ("Deploy" == operate) {//发布多选框 ,现在修改成单选框了
|
|
|
var order1HTML="";
|
|
|
var order1num = 1;
|
|
|
for (var i = 0; i < obj.length; i++) {
|
...
|
...
|
@@ -402,6 +419,7 @@ |
|
|
}
|
|
|
order1HTML += "<div class='rdio rdio-primary' style='display: inline'>";
|
|
|
order1HTML += " <input name='project1' onclick='resetCls_deploy()' type='radio' " + checkstr ;
|
|
|
order1HTML += " supportDeployType='"+obj[i].supportDeployType+"' ";
|
|
|
order1HTML += " cluster_online='"+cluster_online+"' cluster_gray='"+cluster_gray+"' id='" + name + "' value='" + projectId + "'/>";
|
|
|
order1HTML += "<label for='" + name + "' style='width: 200px'>" + name + "</label></div>";
|
|
|
if (order1num % 4 == 0) {
|
...
|
...
|
@@ -502,6 +520,9 @@ |
|
|
index++;
|
|
|
});
|
|
|
var environment = $("input[name='environments']:checked").val();
|
|
|
|
|
|
var supportDeployType =$('input[name="'+checkbox_projectName+'"]:checked').attr("supportDeployType");
|
|
|
|
|
|
var htmlContent="";
|
|
|
for(var i=0;i<cluster_online.length;i++){
|
|
|
var key=cluster_online[i];
|
...
|
...
|
@@ -533,7 +554,7 @@ |
|
|
}
|
|
|
$("#div_cluster_yoho-gray").html(htmlContent);
|
|
|
|
|
|
reloadDeployImage();
|
|
|
reloadDeployImage(supportDeployType);
|
|
|
}
|
|
|
|
|
|
function getRollbackList(){
|
...
|
...
|
|