fix bug in testTask.js
This commit is contained in:
parent
453ddf7ae2
commit
cc3e6a1b6d
|
@ -44,7 +44,7 @@ public class TestPlanInfo {
|
|||
String accessToken,
|
||||
String testPlanId,String caller) throws CustomGenericException,
|
||||
JAXBException {
|
||||
caller =caller+ "_getTestPlanInfo";
|
||||
caller =caller+ "_TestPlanInfo:getTestPlanInfoFormDB";
|
||||
String url = this.baseUrl + "/queryTestPlan/" + testPlanId;
|
||||
TestPlanDBModel testPlanDBModel = (TestPlanDBModel) this
|
||||
.getCommunicateWithMaster().getResponseModel(accessToken, url,
|
||||
|
|
|
@ -8,10 +8,15 @@ $('.datatable').dataTable({
|
|||
"sLengthMenu" : "_MENU_ records per page"
|
||||
}
|
||||
});
|
||||
var testPlanTaskList;
|
||||
function testPlanTaskList() {
|
||||
$('#testTaskList').dataTable().fnClearTable();
|
||||
var statusHtml;
|
||||
$.post("testPlanTaskList", {}, function(data) {
|
||||
$
|
||||
.post(
|
||||
"testPlanTaskList",
|
||||
{},
|
||||
function(data) {
|
||||
if (!data.success) {
|
||||
alert(data.failedMessage);
|
||||
return;
|
||||
|
@ -19,8 +24,7 @@ function testPlanTaskList() {
|
|||
if (data.data.length == 0)
|
||||
return;
|
||||
data = data.data;
|
||||
|
||||
|
||||
testPlanTaskList=data;
|
||||
for ( var i = 0; i < data.length; i++) {
|
||||
var $button = $("<div><a class='btn btn-info' ><i ></i></a></div>");
|
||||
|
||||
|
@ -64,12 +68,15 @@ function getTestPlanIdInTable(obj) {
|
|||
var row = obj.parentNode.parentNode;
|
||||
var testPlanName = $('#testTaskList>tbody').children("tr").eq(
|
||||
row.rowIndex - 1).children("td").eq(1).text();
|
||||
var testPlanId;
|
||||
for ( var i = 0; i < testPlanTaskList.length; i++) {
|
||||
if (testPlanName == testPlanTaskList[i].name)
|
||||
if (testPlanName == testPlanTaskList[i].name) {
|
||||
testPlanId = testPlanTaskList[i].id;
|
||||
}
|
||||
return testPlanId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function viewRealTimeResult(obj) {
|
||||
var testPlanId = getTestPlanIdInTable(obj);
|
||||
window.open("result.jsp?testPlanId=" + testPlanId);
|
||||
|
|
Loading…
Reference in New Issue