...
|
...
|
@@ -105,7 +105,7 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<button id="btnNew" class="btn btn-primary" style="margin-left: 10px;margin-top:10px" onclick="testexecute()">
|
|
|
<button id="btnTest" class="btn btn-primary" style="margin-left: 10px;margin-top:10px" onclick="testexecute()">
|
|
|
集成测试
|
|
|
</button>
|
|
|
</div>
|
...
|
...
|
@@ -224,10 +224,14 @@ |
|
|
|
|
|
//做停止用
|
|
|
var setIntervalIndex;
|
|
|
//调用30次后停止调用
|
|
|
var setIntervalCount = 0;
|
|
|
|
|
|
/**
|
|
|
* 集成测试
|
|
|
*/
|
|
|
function testexecute(){
|
|
|
setIntervalCount = 0;
|
|
|
var value;
|
|
|
var envi = $("#environment_name").val();
|
|
|
if(envi == "aws"){
|
...
|
...
|
@@ -246,8 +250,11 @@ |
|
|
type: 'POST',
|
|
|
dataType: 'json',
|
|
|
success: function (returnVal) {
|
|
|
$("#btnTest").attr('disabled',true);//设置disabled属性为true,按钮不可用
|
|
|
if(returnVal == null || returnVal.data == null){
|
|
|
alert("http://qmc.yohops.com:9999/autoTask/executeApiAutoTask,参数env="+value+",post请求失败!");
|
|
|
$("#btnTest").removeAttr("disabled"); //移除disabled属性
|
|
|
return;
|
|
|
}
|
|
|
var json = returnVal.data;
|
|
|
//获取到id
|
...
|
...
|
@@ -272,6 +279,11 @@ |
|
|
dataType: 'json',
|
|
|
success: function (returnVal) {
|
|
|
if(returnVal == null || returnVal.data == null){
|
|
|
setIntervalCount = setIntervalCount + 1;
|
|
|
if(setIntervalCount >= 30){
|
|
|
$("#btnTest").removeAttr("disabled"); //移除disabled属性
|
|
|
clearInterval(setIntervalIndex);
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
var message = returnVal.message;
|
...
|
...
|
@@ -279,7 +291,7 @@ |
|
|
|
|
|
$("#testingdiv").show();
|
|
|
$("#testingresult").val("id:" + id + ";message:" + message + ";code:"+code);
|
|
|
|
|
|
$("#btnTest").removeAttr("disabled"); //移除disabled属性
|
|
|
clearInterval(setIntervalIndex);
|
|
|
},
|
|
|
error: function (e) {
|
...
|
...
|
|