add test result loading progress
This commit is contained in:
parent
698a833ba8
commit
bf5e7d5943
|
@ -1,7 +1,3 @@
|
|||
#center{
|
||||
margin:50px auto;
|
||||
width:400px;
|
||||
}
|
||||
#loading{
|
||||
width:397px;
|
||||
height:49px;
|
||||
|
@ -17,16 +13,3 @@ font-family:Tahoma;
|
|||
font-size:18px;
|
||||
line-height:48px;
|
||||
}
|
||||
#message{
|
||||
width:200px;
|
||||
height:35px;
|
||||
font-family:Tahoma;
|
||||
font-size:12px;
|
||||
background-color:#d8e7f0;
|
||||
border:1px solid #187CBE;
|
||||
display:none;
|
||||
line-height:35px;
|
||||
text-align:center;
|
||||
margin-bottom:10px;
|
||||
margin-left:50px
|
||||
}
|
|
@ -86,4 +86,21 @@ margin-top: 5px;
|
|||
.innerTable thead:first-child tr:first-child th{
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom:1px solid #ccc;
|
||||
}
|
||||
}
|
||||
#loading{
|
||||
width:397px;
|
||||
height:49px;
|
||||
background:url(/images/bak.png) no-repeat;
|
||||
}
|
||||
#loading div{
|
||||
width:0px;
|
||||
height:48px;
|
||||
background:url(/images/pro.png) no-repeat;
|
||||
color:#fff;
|
||||
text-align:center;
|
||||
font-family:Tahoma;
|
||||
font-size:18px;
|
||||
line-height:48px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
<head>
|
||||
|
||||
<link rel="stylesheet" href="bench4q-css/demo.css">
|
||||
<link id="bs-css" href="css/bootstrap-cerulean.css" rel="stylesheet">
|
||||
<link href="css/jquery-ui-1.8.21.custom.css" rel="stylesheet">
|
||||
</head><body>
|
||||
|
||||
<script src="js/jquery-1.7.2.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var progress_id = "loading";
|
||||
|
@ -24,14 +27,26 @@ SetProgress(i);
|
|||
i++;
|
||||
}
|
||||
}
|
||||
$(document).ready(function() {
|
||||
/* $(document).ready(function() {
|
||||
doProgress();
|
||||
});
|
||||
}); */
|
||||
function load(){
|
||||
$('#load').modal('show');
|
||||
doProgress();
|
||||
}
|
||||
</script>
|
||||
<div id="center">
|
||||
<div id="message"></div>
|
||||
<div id="loading"><div></div></div>
|
||||
</div>
|
||||
|
||||
<div>Hello world</div>
|
||||
<div><button onclick="load()"></button></div>
|
||||
<div class="modal hide fade" id="load">
|
||||
<div id="center">
|
||||
<div id="message"></div>
|
||||
<div id="loading">
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
|
||||
<!-- modal / dialog library -->
|
||||
<script src="js/bootstrap-modal.js"></script>
|
||||
</body></html>
|
|
@ -152,30 +152,34 @@ body {
|
|||
cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<jsp:include page="publiccontrol/footer.jsp"></jsp:include>
|
||||
<script src="js/jquery-1.7.2.min.js"></script>
|
||||
<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
|
||||
<script src="js/jquery.i18n.properties-1.0.9.js"></script>
|
||||
<script src="js/bootstrap-modal.js"></script>
|
||||
<script src="js/bootstrap-dropdown.js"></script>
|
||||
<script src="js/jquery.cookie.js"></script>
|
||||
<script src='js/jquery.dataTables.min.js'></script>
|
||||
<script src="js/theme.js"></script>
|
||||
<script src="script/base.js"></script>
|
||||
<script src="js/highcharts.js"></script>
|
||||
<!-- <script src="http://code.highcharts.com/stock/highstock.js"></script> -->
|
||||
<script src="script/charts.js"></script>
|
||||
<script src="script/test-brief.js"></script>
|
||||
<script src="script/bench4q.table.js"></script>
|
||||
<script src="script/result-table.js"></script>
|
||||
<script src="script/highChartTheme.js"></script>
|
||||
<script src="script/result-tree.js"></script>
|
||||
<script src="script/resultInfo.js"></script>
|
||||
<script src="script/chartSelector.js"></script>
|
||||
<script src="script/pieChart.js"></script>
|
||||
<div class="modal hide fade" id="load">
|
||||
|
||||
<script src="script/result.js"></script>
|
||||
<div id="loading"><div></div></div>
|
||||
</div>
|
||||
<hr>
|
||||
<jsp:include page="publiccontrol/footer.jsp"></jsp:include>
|
||||
<script src="js/jquery-1.7.2.min.js"></script>
|
||||
<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
|
||||
<script src="js/jquery.i18n.properties-1.0.9.js"></script>
|
||||
<script src="js/bootstrap-modal.js"></script>
|
||||
<script src="js/bootstrap-dropdown.js"></script>
|
||||
<script src="js/jquery.cookie.js"></script>
|
||||
<script src='js/jquery.dataTables.min.js'></script>
|
||||
<script src="js/theme.js"></script>
|
||||
<script src="script/base.js"></script>
|
||||
<script src="js/highcharts.js"></script>
|
||||
<!-- <script src="http://code.highcharts.com/stock/highstock.js"></script> -->
|
||||
<script src="script/charts.js"></script>
|
||||
<script src="script/result-test-brief.js"></script>
|
||||
<script src="script/bench4q.table.js"></script>
|
||||
<script src="script/result-table.js"></script>
|
||||
<script src="script/highChartTheme.js"></script>
|
||||
<script src="script/result-tree.js"></script>
|
||||
<script src="script/resultInfo.js"></script>
|
||||
<script src="script/chartSelector.js"></script>
|
||||
<script src="script/pieChart.js"></script>
|
||||
<script src="script/result-load.js"></script>
|
||||
<script src="script/result.js"></script>
|
||||
</fmt:bundle>
|
||||
</body>
|
||||
</html>
|
|
@ -97,8 +97,9 @@ Chart.prototype.addGraph = function(model) {
|
|||
chart.addDataToGraph(chart,model,intervalId,data[i]);
|
||||
}
|
||||
}
|
||||
else chart.addDataToGraph(chart,model,intervalId,data)
|
||||
|
||||
else chart.addDataToGraph(chart,model,intervalId,data);
|
||||
|
||||
loadItems.scriptBriefStatusAve=true;
|
||||
}, "json");
|
||||
|
||||
}, intervalTime);
|
||||
|
|
|
@ -51,9 +51,10 @@ var UrlContentTypeDistribution = function(containerId, testPlanId) {
|
|||
for(var key in data)
|
||||
dataArray.push([key,data[key]]);
|
||||
chart.series[0].setData(dataArray);
|
||||
loadItems.urlDistribution=true;
|
||||
}
|
||||
},"json");
|
||||
|
||||
|
||||
if (testStatus == "Complete"&&i>=1) {
|
||||
clearInterval(intervalId);
|
||||
return;
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
var table;
|
||||
$(document).ready(function() {
|
||||
table = new bench4q.table("Port");
|
||||
table.loadTable();
|
||||
});
|
||||
|
||||
function edittablerow(obj) {
|
||||
var row = obj.parentNode.parentNode;
|
||||
alert(row.rowIndex);
|
||||
}
|
||||
|
||||
function deletetablerow(obj) {
|
||||
table.deleteTableRow(obj);
|
||||
}
|
||||
|
||||
function addPort() {
|
||||
$("#port").val(0);
|
||||
$("#portParam").modal('show');
|
||||
}
|
||||
|
||||
function addPortToDB() {
|
||||
$.post("addPortToPool", {
|
||||
port : $("#port").val()
|
||||
}, function(data) {
|
||||
if (data ) {
|
||||
table.loadTable();
|
||||
}
|
||||
});
|
||||
}
|
|
@ -48,6 +48,8 @@ PageResult.prototype.addResultToTable = function() {
|
|||
var row = extractRowDataActionBefore(result[i], this.header, null);
|
||||
this.table.fnAddData(row);
|
||||
}
|
||||
loadItems.pageResult=true;
|
||||
|
||||
}
|
||||
var PageResultModel = function(page, scriptPageBriefModel, scriptName) {
|
||||
this.page = page;
|
||||
|
@ -197,6 +199,7 @@ BehaviorResult.prototype.addBehaviorsToTable = function() {
|
|||
this.header, this.actionAdd);
|
||||
this.table.fnAddData(row);
|
||||
}
|
||||
loadItems.behaviorResult=true;
|
||||
}
|
||||
BehaviorResult.prototype.DetailAddListener = function() {
|
||||
var behaviorResult = this;
|
||||
|
|
|
@ -3,6 +3,7 @@ function getTestBrief(testPlanId) {
|
|||
showTestPlanStatusAsync(testPlanId);
|
||||
var startTime=0;
|
||||
showTestBriefStatus(startTime);
|
||||
loadItems.testBrief=true;
|
||||
if(testStatus=="Complete")
|
||||
clearInterval(intervalId);
|
||||
},5000);
|
||||
|
@ -24,6 +25,7 @@ function showTestBriefStatus(startTime){
|
|||
startTime=data.time;
|
||||
$("#vu").html('VUs active<br/><br><h4>'+data.vus+'</h4>');
|
||||
$("#request").html('Requests<br/><br><h4>'+data.requests+'</h4>');
|
||||
|
||||
},"json");
|
||||
}
|
||||
function getTestPlanStatus(testPlanId) {
|
|
@ -1,9 +1,18 @@
|
|||
var LoadItems=function(){
|
||||
this.scriptBriefStatusAve=false;
|
||||
this.pageResult=false;
|
||||
this.behaviorResult=false;
|
||||
this.urlDistribution=false;
|
||||
this.testBrief=false;
|
||||
};
|
||||
var loadItems=new LoadItems();
|
||||
var testStatus;
|
||||
$(document).ready(
|
||||
function() {
|
||||
testPlanId = getvars()['testPlanId'];
|
||||
var testStatus;
|
||||
if (!getTestPlanStatus(testPlanId))
|
||||
return;
|
||||
doProgress();
|
||||
getTestBrief(testPlanId);
|
||||
var tree = getResultInfoTree(testPlanId);
|
||||
var replaceArray = createUrlReplaceArray(testPlanId);
|
||||
|
|
|
@ -120,6 +120,7 @@ body {
|
|||
<script src="js/theme.js"></script>
|
||||
<script src="script/base.js"></script>
|
||||
<script src="script/bench4q.table.js"></script>
|
||||
<script src="script/loadTestPlans.js"></script>
|
||||
<script src="script/testPlans.js"></script>
|
||||
</fmt:bundle>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue