modify testPlan settings charPlots
This commit is contained in:
parent
86a52df435
commit
bdba094fff
|
@ -91,13 +91,15 @@ select{
|
|||
border:red 2px solid;
|
||||
}
|
||||
.load-config-input{
|
||||
width:100px;
|
||||
width:150px;
|
||||
}
|
||||
.load-config-input-alert{
|
||||
width:100px;
|
||||
|
||||
border:red 2px solid;
|
||||
}
|
||||
#loadConfig td{
|
||||
padding-left:50px;
|
||||
}
|
||||
.allocation-input{
|
||||
width:100px;
|
||||
}
|
||||
|
@ -112,3 +114,6 @@ select{
|
|||
width:150px;
|
||||
border:red 2px solid;
|
||||
}
|
||||
#addStep{
|
||||
margin-left:50px;
|
||||
}
|
|
@ -59,26 +59,6 @@ function checkRequireLoad() {
|
|||
"load-config-input");
|
||||
}
|
||||
|
||||
function checkWarmUp() {
|
||||
if (parseInt($("#WarmUp").val()) <= 0
|
||||
|| $("#WarmUp").val() == "")
|
||||
$("#WarmUp").attr("class",
|
||||
"load-config-input-alert");
|
||||
else
|
||||
$("#WarmUp").attr("class",
|
||||
"load-config-input");
|
||||
}
|
||||
|
||||
function checkCoolDown() {
|
||||
if (parseInt($("#CoolDown").val()) <= 0
|
||||
|| $("#CoolDown").val() == "")
|
||||
$("#CoolDown").attr("class",
|
||||
"load-config-input-alert");
|
||||
else
|
||||
$("#CoolDown").attr("class",
|
||||
"load-config-input");
|
||||
}
|
||||
|
||||
function checkExecuteRange() {
|
||||
if (parseInt($("#ExecuteRange").val()) <= 0
|
||||
|| $("#ExecuteRange").val() == "")
|
||||
|
@ -91,13 +71,9 @@ function checkExecuteRange() {
|
|||
|
||||
function checkLoadConfig() {
|
||||
checkExecuteRange();
|
||||
checkCoolDown();
|
||||
checkRequireLoad();
|
||||
checkWarmUp();
|
||||
if ($("#ExecuteRange").attr("class") == "load-config-input"
|
||||
&& $("#CoolDown").attr("class") == "load-config-input"
|
||||
&& $("#WarmUp").attr("class") == "load-config-input"
|
||||
&& $("#RequireLoad").attr("class") == "load-config-input")
|
||||
if ($('input[name="ExecuteRange"]').attr("class") == "load-config-input"
|
||||
&& $('input[name="RequireLoad"]').attr("class") == "load-config-input")
|
||||
$("#loadConfigMessage").attr("class",
|
||||
"hide");
|
||||
else
|
||||
|
|
|
@ -24,11 +24,11 @@ function loadSchedulePlot() {
|
|||
defaultSeriesType : 'line',
|
||||
type : 'area',
|
||||
height : 300,
|
||||
|
||||
},
|
||||
plotOptions : {
|
||||
series : {
|
||||
fillOpacity : 0.5,
|
||||
fillOpacity : 0.85,
|
||||
color : '#369bd7'
|
||||
}
|
||||
},
|
||||
credits : {
|
||||
|
@ -44,6 +44,9 @@ function loadSchedulePlot() {
|
|||
xAxis : {
|
||||
categories : [ 0 ],
|
||||
min : 0,
|
||||
title : {
|
||||
text : 'Time(s)'
|
||||
}
|
||||
},
|
||||
yAxis : {
|
||||
plotLines : [ {
|
||||
|
@ -51,6 +54,9 @@ function loadSchedulePlot() {
|
|||
width : 1,
|
||||
color : '#808080'
|
||||
} ],
|
||||
title : {
|
||||
text : 'Users'
|
||||
},
|
||||
min : 0
|
||||
},
|
||||
tooltip : {
|
||||
|
@ -63,16 +69,18 @@ function loadSchedulePlot() {
|
|||
data : [ 0 ]
|
||||
} ]
|
||||
};
|
||||
var RequireLoad = parseInt($("#RequireLoad").val());
|
||||
var WarmUp = parseInt($("#WarmUp").val());
|
||||
var CoolDown = parseInt($("#CoolDown").val());
|
||||
var ExecuteRange = parseInt($("#ExecuteRange").val());
|
||||
options.xAxis.categories.push(WarmUp);
|
||||
options.xAxis.categories.push(WarmUp + ExecuteRange);
|
||||
options.xAxis.categories.push(WarmUp + ExecuteRange + CoolDown);
|
||||
var RequireLoadLength = $('input[name="RequireLoad"]').length;
|
||||
var RequireLoad = 0;
|
||||
for(var i = 1; i < RequireLoadLength; i++){
|
||||
RequireLoad = parseInt($('input[name="RequireLoad"]')[i].value);
|
||||
options.series[0].data.push(RequireLoad);
|
||||
options.series[0].data.push(RequireLoad);
|
||||
options.series[0].data.push(0);
|
||||
}
|
||||
var ExecuteRangeLength = $('input[name="ExecuteRange"]').length;
|
||||
var ExecuteRange = 0;
|
||||
for(var i = 1; i < ExecuteRangeLength; i++){
|
||||
ExecuteRange += parseInt($('input[name="ExecuteRange"]')[i].value);
|
||||
options.xAxis.categories.push(ExecuteRange);
|
||||
}
|
||||
var chart = new Highcharts.Chart(options);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,22 @@ $("#selectFilter #ok").click(function() {
|
|||
$("#createFilter").click(function() {
|
||||
$("#selectFilter").show();
|
||||
})
|
||||
$("#addStep").click(function(){
|
||||
var clone=$("#step-clone-continuous").clone();
|
||||
clone.removeAttr('id');
|
||||
clone.show();
|
||||
clone.appendTo('#test-plan-continuous');
|
||||
loadSchedulePlot();
|
||||
checkLoadConfig();
|
||||
});
|
||||
function deleteStep(){
|
||||
var deleteStep = document.getElementsByClassName('deleteStep');
|
||||
var length = deleteStep.length;
|
||||
var deleteObj = $(deleteStep[length-1]).parent().parent().parent().parent().parent();
|
||||
deleteObj.remove();
|
||||
loadSchedulePlot();
|
||||
checkLoadConfig();
|
||||
}
|
||||
var scenarioConfigContent;
|
||||
function addScenario() {
|
||||
//create delete button
|
||||
|
|
|
@ -82,41 +82,44 @@ body {
|
|||
</div>
|
||||
<div id="loadTestExecutionPlan" class="content-frame row-fluid">
|
||||
<div class="span4">
|
||||
<div id="test-plan-continuous" class="form" style="float:left;">
|
||||
<div id="step-clone-continuous" class="field-line" style="display:none;">
|
||||
<table id="loadConfig" class="table-margin-top">
|
||||
<tr>
|
||||
<td><fmt:message key="test-load" /></td>
|
||||
<td><input id="RequireLoad" class="load-config-input"
|
||||
type="text" value="10"
|
||||
onblur="loadSchedulePlot();checkLoadConfig()" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><fmt:message key="test-warmUp" />(s)</td>
|
||||
<td><input id="WarmUp" class="load-config-input"
|
||||
type="text" value="10"
|
||||
onblur="loadSchedulePlot();checkLoadConfig()" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><fmt:message key="test-coldDown" />(s)</td>
|
||||
<td><input id="CoolDown" class="load-config-input"
|
||||
type="text" value="10"
|
||||
onblur="loadSchedulePlot();checkLoadConfig()" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="15"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><fmt:message key="test-excuteRange" />(s)</td>
|
||||
<td><input id="ExecuteRange" class="load-config-input"
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="RequireLoad" class="load-config-input"
|
||||
type="text" value="10"
|
||||
onblur="loadSchedulePlot();checkLoadConfig()" /></td>
|
||||
<td width="186px"><input name="ExecuteRange" class="load-config-input"
|
||||
type="text" value="10"
|
||||
onblur="loadSchedulePlot();checkLoadConfig()" />
|
||||
<a href="#" class="deleteStep" onClick="deleteStep()"><img src="/images/delete.png" alt="Delete" width="16" height="16"></a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="field-inline">
|
||||
<table id="loadConfig" class="table-margin-top">
|
||||
<tr>
|
||||
<td><fmt:message key="test-load" /></td>
|
||||
<td><fmt:message key="test-excuteRange" />(s)</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="RequireLoad" class="load-config-input"
|
||||
type="text" value="10"
|
||||
onblur="loadSchedulePlot();checkLoadConfig()" /></td>
|
||||
<td width="186px"><input name="ExecuteRange" class="load-config-input"
|
||||
type="text" value="10"
|
||||
onblur="loadSchedulePlot();checkLoadConfig()" /></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" id="addStep">Add step</button>
|
||||
<span id="loadConfigMessage" class="hide">all input can
|
||||
not be empty <br />and must be greater than zero!
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue