Authored by qinchao

校验

... ... @@ -184,9 +184,10 @@
<script src="<%=basePath%>js/bootstrap.min.js"></script>
<script src="<%=basePath%>js/select2.min.js"></script>
<script src="<%=basePath%>js/custom.js"></script>
<script src="<%=basePath%>script/build/node_project.js?v=20180323"></script>
<script src="<%=basePath %>/js/unicorn.js"></script>
<script src="<%=basePath %>js/bootstrap-plugin/bootstrap.dialog.js" charset="UTF-8" type="text/javascript"></script>
<script src="<%=basePath %>script/common/genarate_left_panel.js?v=<%=ProjectConstant.MENU_VERSION %>"></script>
<script src="<%=basePath%>script/build/node_project.js?v=20180326"></script>
<script type="text/javascript">
$("#li_project").addClass("active open");
... ...
... ... @@ -100,7 +100,7 @@ function comfirmSubmit() {
var environment = $("input[name='environments']:checked").val();
var project = $("input[name='project']:checked").val();
if (!project) {
alert("请选择项目");
localAlert("参数错误", "请选择项目");
return;
}
var hosts = new Array();
... ... @@ -117,12 +117,12 @@ function comfirmSubmit() {
if ("Deploy" == operate) {//发布
var branch = $("input[name='branch']").val();
if (branch == "") {
alert("请填写分支名称");
localAlert("参数错误", "请填写分支名称");
return;
}
var workid = $("input[name='workid']").val();
if (workid == "") {
alert("请填写关联工单号");
localAlert("参数错误", "请填写关联工单号");
return;
}
... ... @@ -137,7 +137,7 @@ function comfirmSubmit() {
},
success: function (dataResp) {
if (dataResp==null||dataResp.code != 200) {
alert(dataResp.message);
localAlert("校验不通过",dataResp.message);
return;
} else {
$("input[name='branch_name']").val(branch);
... ... @@ -146,18 +146,18 @@ function comfirmSubmit() {
}
},
error: function (e) {
alert("从后台获取数据出错");
localAlert("错误","从后台获取数据出错");
}
});
} else {//回滚
var rollbackfile = $("#rollbackList option:selected").val();
if (typeof(rollbackfile) == "undefined" || rollbackfile == "") {
alert("请选择回滚版本");
localAlert("参数错误","请选择回滚版本");
return;
}
var workid = $("input[name='workid']").val();
if (workid == "") {
alert("请填写关联工单号");
localAlert("参数错误","请填写关联工单号");
return;
}
$("input[name='workid_name']").val(workid);
... ...