優化獲取日誌失敗時的顯示。當ajax complex事件執行的時候,返回狀態如果爲success或者timeout之外的值,顯示failed
This commit is contained in:
@@ -64,6 +64,7 @@
|
|||||||
hexCheck:"Please enter the HEX format character",
|
hexCheck:"Please enter the HEX format character",
|
||||||
invisibleChar:"Please enter the visible character",
|
invisibleChar:"Please enter the visible character",
|
||||||
hasInvisibleChar:"The tag {0} has invisible character",
|
hasInvisibleChar:"The tag {0} has invisible character",
|
||||||
haveInvisibleChar:"The tags {0} have invisible character"
|
haveInvisibleChar:"The tags {0} have invisible character",
|
||||||
|
failed:"Failed"
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
hexCheck:"请输入十六进制字符",
|
hexCheck:"请输入十六进制字符",
|
||||||
invisibleChar:"请输入可见字符",
|
invisibleChar:"请输入可见字符",
|
||||||
hasInvisibleChar:"标签{0}包含不可见字符",
|
hasInvisibleChar:"标签{0}包含不可见字符",
|
||||||
haveInvisibleChar:"标签{0}包含不可见字符"
|
haveInvisibleChar:"标签{0}包含不可见字符",
|
||||||
|
failed:"获取失败"
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -1174,6 +1174,7 @@ var GetLogTotal=function(_data){
|
|||||||
}
|
}
|
||||||
var totalTrs=$(_data.objs);
|
var totalTrs=$(_data.objs);
|
||||||
var timeout=$.validator.messages.timeout;
|
var timeout=$.validator.messages.timeout;
|
||||||
|
var failed=$.validator.messages.failed;
|
||||||
var request=$.ajax({
|
var request=$.ajax({
|
||||||
type:'post',
|
type:'post',
|
||||||
timeout:10000,//超时时间设置,查询接口时间过长超时
|
timeout:10000,//超时时间设置,查询接口时间过长超时
|
||||||
@@ -1197,6 +1198,10 @@ var GetLogTotal=function(_data){
|
|||||||
totalTrs.each(function(){
|
totalTrs.each(function(){
|
||||||
$(this).html(timeout);
|
$(this).html(timeout);
|
||||||
})
|
})
|
||||||
|
}else if(status !="success"){
|
||||||
|
totalTrs.each(function(){
|
||||||
|
$(this).html(failed);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user