modify target model

modify target model
This commit is contained in:
luqiong 2014-09-25 10:12:33 +08:00
parent 5e869eccfa
commit bb68839b93
5 changed files with 26 additions and 38 deletions

View File

@ -213,10 +213,6 @@ stopRecording=Stop Recording
custom-mode=Custom Mode custom-mode=Custom Mode
target-mode=Target Mode target-mode=Target Mode
load-mode=Load 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 stress-control=Stress Control
initial-users=Initial Users initial-users=Initial Users
maximum-users=Maximum Users maximum-users=Maximum Users

View File

@ -214,10 +214,6 @@ stopRecording=\u505C\u6B62\u5f55\u5236
custom-mode=\u5E38\u89C4\u6A21\u5F0F custom-mode=\u5E38\u89C4\u6A21\u5F0F
target-mode=\u76EE\u6807\u6A21\u5F0F target-mode=\u76EE\u6807\u6A21\u5F0F
load-mode=\u65BD\u538B\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 stress-control=\u538B\u529B\u63A7\u5236
initial-users=\u521D\u59CB\u7528\u6237\u6570 initial-users=\u521D\u59CB\u7528\u6237\u6570
maximum-users=\u6700\u5927\u7528\u6237\u6570 maximum-users=\u6700\u5927\u7528\u6237\u6570

View File

@ -152,13 +152,30 @@ function loadLimitableFields(){
var script = new Array(); var script = new Array();
for ( var i = 0; i < data.length; i++) for ( var i = 0; i < data.length; i++)
script.push(data[i]); script.push(data[i]);
var tbodyNode = document.getElementById("loadConfig2").children[0];
for ( var j = 0; j < script.length; j++) { for ( var j = 0; j < script.length; j++) {
var textNode = document.createTextNode(script[j]); var textNode = document.createTextNode(script[j]);
var optionNode = document.createElement("option"); var tdNode = document.createElement("td");
optionNode.setAttribute("value", script[j]); var tdNode2 = document.createElement("td");
optionNode.appendChild(textNode); var inputNode = document.createElement("input");
var selectNode = document.getElementsByName("select-target-type")[0]; inputNode.setAttribute("name", script[j]);
selectNode.appendChild(optionNode); inputNode.setAttribute("class","load-config-input");
inputNode.setAttribute("type","text");
if(j%2){
tdNode.appendChild(textNode);
trNode.appendChild(tdNode);
tbodyNode.appendChild(trNode);
tdNode2.appendChild(inputNode);
trNode2.appendChild(tdNode2);
tbodyNode.appendChild(trNode2);
}else{
var trNode = document.createElement("tr");
var trNode2 = document.createElement("tr");
tdNode.appendChild(textNode);
trNode.appendChild(tdNode);
tdNode2.appendChild(inputNode);
trNode2.appendChild(tdNode2);
}
} }
} }
}).error(function(){ }).error(function(){

View File

@ -181,8 +181,8 @@ function loadSchedulePlot2() {
var IncreaseUsers = parseInt($('input[name="increase-users"]').val()); var IncreaseUsers = parseInt($('input[name="increase-users"]').val());
var time = 0; var time = 0;
for(var i = InitialUsers; i <= MaxUsers; i+=IncreaseUsers){ for(var i = InitialUsers; i <= MaxUsers; i+=IncreaseUsers){
time += TimeInterval;
options.series[0].data.push([time,i]); options.series[0].data.push([time,i]);
time += TimeInterval;
} }
var chart = new Highcharts.Chart(options); var chart = new Highcharts.Chart(options);

View File

@ -150,34 +150,12 @@ body {
<div id="test-plan-continuous2" class="form" style="float: left;"> <div id="test-plan-continuous2" class="form" style="float: left;">
<div class="field-inline"> <div class="field-inline">
<table id="loadConfig2" class="table-margin-top"> <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> <tr>
<th><fmt:message key="stress-control" /></th> <th><fmt:message key="stress-control" /></th>
</tr> </tr>
<tr> <tr>
<td width="50%"><fmt:message key="initial-users" /></td> <td><fmt:message key="initial-users" /></td>
<td width="50%"><fmt:message key="maximum-users" /></td> <td><fmt:message key="maximum-users" /></td>
</tr> </tr>
<tr> <tr>
<td><input name="initial-users" <td><input name="initial-users"
@ -199,6 +177,7 @@ body {
class="load-config-input" type="text" value="10" class="load-config-input" type="text" value="10"
onblur="loadSchedulePlot2();checkLoadConfig()" /></td> onblur="loadSchedulePlot2();checkLoadConfig()" /></td>
</tr> </tr>
<tr><td><hr></td></tr>
</table> </table>
</div> </div>
</div> </div>