parent
a8dc75cbd4
commit
49bea2f594
|
@ -213,3 +213,12 @@ stopRecording=Stop Recording
|
|||
custom-mode=Custom Mode
|
||||
target-mode=Target Mode
|
||||
load-mode=Load Mode
|
||||
target-type=Target Type
|
||||
affairs-name=Affairs Name
|
||||
target-value=Target Value
|
||||
cpu-threshold=CPU Threshold
|
||||
stress-control=Stress Control
|
||||
initial-users=Initial Users
|
||||
maximum-users=Maximum Users
|
||||
time-interval=Time Interval
|
||||
increase-users=Increase Users
|
|
@ -214,3 +214,12 @@ stopRecording=\u505C\u6B62\u5f55\u5236
|
|||
custom-mode=\u5E38\u89C4\u6A21\u5F0F
|
||||
target-mode=\u76EE\u6807\u6A21\u5F0F
|
||||
load-mode=\u65BD\u538B\u6A21\u5F0F
|
||||
target-type=\u76EE\u6807\u7C7B\u578B
|
||||
affairs-name=\u4E8B\u52A1\u540D
|
||||
target-value=\u76EE\u6807\u503C
|
||||
cpu-threshold=\u9650\u5236\u9608\u503C
|
||||
stress-control=\u538B\u529B\u63A7\u5236
|
||||
initial-users=\u521D\u59CB\u7528\u6237\u6570
|
||||
maximum-users=\u6700\u5927\u7528\u6237\u6570
|
||||
time-interval=\u65F6\u95F4\u95F4\u9694
|
||||
increase-users=\u589E\u52A0\u7528\u6237
|
|
@ -60,14 +60,22 @@ padding:0;
|
|||
}
|
||||
select{
|
||||
margin-bottom:0px;
|
||||
width:75%;
|
||||
}
|
||||
#highchartsPlot{
|
||||
margin-left:10%;
|
||||
margin-top:10px;
|
||||
margin-bottom:10px;
|
||||
width:65%;
|
||||
|
||||
}
|
||||
|
||||
#highchartsPlot2{
|
||||
margin-left:10%;
|
||||
margin-top:10px;
|
||||
margin-bottom:10px;
|
||||
width:65%;
|
||||
}
|
||||
|
||||
.centre{
|
||||
margin:20px;
|
||||
margin-left:290px;
|
||||
|
@ -130,3 +138,6 @@ div#test-plan-continuous{
|
|||
.modeSelectTitle{
|
||||
margin-right:15px;
|
||||
}
|
||||
div#test-plan-continuous2{
|
||||
width:100%;
|
||||
}
|
|
@ -145,7 +145,19 @@ function loadLimitableFields(){
|
|||
information(data.failedMessage);
|
||||
return;
|
||||
}else{
|
||||
data.limitableFields.fields;//this is list<String>, limitable fields' name
|
||||
//this is list<String>, limitable fields' name
|
||||
data = data.limitableFields.fields;
|
||||
var script = new Array();
|
||||
for ( var i = 0; i < data.length; i++)
|
||||
script.push(data[i]);
|
||||
for ( var j = 0; j < script.length; j++) {
|
||||
var textNode = document.createTextNode(script[j]);
|
||||
var optionNode = document.createElement("option");
|
||||
optionNode.setAttribute("value", script[j]);
|
||||
optionNode.appendChild(textNode);
|
||||
var selectNode = document.getElementsByName("select-target-type")[0];
|
||||
selectNode.appendChild(optionNode);
|
||||
}
|
||||
}
|
||||
}).error(function(){
|
||||
information($.i18n.prop('failed-connect-server'));
|
||||
|
|
|
@ -114,4 +114,76 @@ function toggleIpConfig() {
|
|||
function changeMode(newModeId, oldModeId){
|
||||
$("#"+oldModeId).addClass("hide");
|
||||
$("#"+newModeId).removeClass("hide");
|
||||
if(newModeId=='targetMode')
|
||||
loadSchedulePlot2();
|
||||
else
|
||||
loadSchedulePlot();
|
||||
}
|
||||
|
||||
function loadSchedulePlot2() {
|
||||
var options = {
|
||||
chart : {
|
||||
renderTo : 'highchartsPlot2',
|
||||
defaultSeriesType : 'line',
|
||||
type : 'area',
|
||||
height : 300,
|
||||
},
|
||||
plotOptions : {
|
||||
series : {
|
||||
fillOpacity : 0.85,
|
||||
color : '#369bd7'
|
||||
}
|
||||
},
|
||||
credits : {
|
||||
enabled : false
|
||||
},
|
||||
legend : {
|
||||
enabled : false
|
||||
},
|
||||
title : {
|
||||
text : $.i18n.prop('test-loadSchedule') ,
|
||||
x : -50
|
||||
},
|
||||
xAxis : {
|
||||
plotLines : [ {
|
||||
width : 10,
|
||||
color : '#808080'
|
||||
} ],
|
||||
min : 0,
|
||||
title : {
|
||||
text : 'Time(s)'
|
||||
}
|
||||
},
|
||||
yAxis : {
|
||||
plotLines : [ {
|
||||
value : 0,
|
||||
width : 1,
|
||||
color : '#808080'
|
||||
} ],
|
||||
title : {
|
||||
text : 'Users'
|
||||
},
|
||||
min : 0
|
||||
},
|
||||
tooltip : {
|
||||
formatter : function() {
|
||||
var formatStr = '<b>'+this.y+ ' users after ' + this.x + ' seconds</b>';
|
||||
return formatStr;
|
||||
}
|
||||
},
|
||||
series : [ {
|
||||
data : [[ 0 , 0 ]]
|
||||
} ]
|
||||
};
|
||||
var InitialUsers = parseInt($('input[name="initial-users"]').val());
|
||||
var MaxUsers = parseInt($('input[name="maximum-users"]').val());
|
||||
var TimeInterval = parseInt($('input[name="time-interval"]').val());
|
||||
var IncreaseUsers = parseInt($('input[name="increase-users"]').val());
|
||||
var time = 0;
|
||||
for(var i = InitialUsers; i <= MaxUsers; i+=IncreaseUsers){
|
||||
time += TimeInterval;
|
||||
options.series[0].data.push([time,i]);
|
||||
}
|
||||
var chart = new Highcharts.Chart(options);
|
||||
currentChart = chart;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
var currentChart;
|
||||
$(document).ready(function() {
|
||||
loadScripts();
|
||||
loadLimitableFields();
|
||||
loadSchedulePlot();
|
||||
loadFilterTypeList();
|
||||
});
|
||||
|
|
|
@ -147,6 +147,61 @@ body {
|
|||
</div>
|
||||
<div id="targetMode" class="hide content-frame row-fluid">
|
||||
<div class="span4">
|
||||
<div id="test-plan-continuous2" class="form" style="float: left;">
|
||||
<div class="field-inline">
|
||||
<table id="loadConfig2" class="table-margin-top">
|
||||
<tr>
|
||||
<td width="30%"><fmt:message key="target-type" /></td>
|
||||
<td width="40%"><fmt:message key="affairs-name" /></td>
|
||||
<td width="30%"><fmt:message key="target-value" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><select name="select-target-type"></select></td>
|
||||
<td><input name="affairs-name"
|
||||
class="load-config-input" type="text" value="" /></td>
|
||||
<td><input name="target-value"
|
||||
class="load-config-input" type="text" value="100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30%">cpu <fmt:message key="cpu-threshold" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="cpu-threshold"
|
||||
class="load-config-input" type="text" value="100" /> % </td>
|
||||
</tr>
|
||||
</table>
|
||||
<tr><td><hr></td></tr>
|
||||
<table id="loadConfig3" class="table-margin-top">
|
||||
<tr>
|
||||
<th><fmt:message key="stress-control" /></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%"><fmt:message key="initial-users" /></td>
|
||||
<td width="50%"><fmt:message key="maximum-users" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="initial-users"
|
||||
class="load-config-input" type="text" value="10"
|
||||
onblur="loadSchedulePlot2();checkLoadConfig()" /></td>
|
||||
<td><input name="maximum-users"
|
||||
class="load-config-input" type="text" value="10"
|
||||
onblur="loadSchedulePlot2();checkLoadConfig()" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><fmt:message key="time-interval" /></td>
|
||||
<td><fmt:message key="increase-users" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input name="time-interval"
|
||||
class="load-config-input" type="text" value="10"
|
||||
onblur="loadSchedulePlot2();checkLoadConfig()" /></td>
|
||||
<td><input name="increase-users"
|
||||
class="load-config-input" type="text" value="10"
|
||||
onblur="loadSchedulePlot2();checkLoadConfig()" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<span id="loadConfigMessage2" class="hide">all input can
|
||||
not be empty <br />and must be greater than zero!
|
||||
</span>
|
||||
|
|
Loading…
Reference in New Issue