From bb68839b93e38251f351da757ad8c10b67f27095 Mon Sep 17 00:00:00 2001 From: luqiong <605601787@qq.com> Date: Thu, 25 Sep 2014 10:12:33 +0800 Subject: [PATCH] modify target model modify target model --- .../webapp/WEB-INF/classes/i18n_en.properties | 4 --- .../webapp/WEB-INF/classes/i18n_zh.properties | 4 --- .../webapp/script/TestPlan/TestPlanServer.js | 27 +++++++++++++++---- .../main/webapp/script/TestPlan/TestPlanUI.js | 2 +- Bench4Q-Web/src/main/webapp/test.jsp | 27 +++---------------- 5 files changed, 26 insertions(+), 38 deletions(-) diff --git a/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_en.properties b/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_en.properties index 1685aa2e..55f7e00f 100644 --- a/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_en.properties +++ b/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_en.properties @@ -213,10 +213,6 @@ 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 diff --git a/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_zh.properties b/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_zh.properties index 43259be3..1e6bc3db 100644 --- a/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_zh.properties +++ b/Bench4Q-Web/src/main/webapp/WEB-INF/classes/i18n_zh.properties @@ -214,10 +214,6 @@ 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 diff --git a/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanServer.js b/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanServer.js index f088b2d3..5825d460 100644 --- a/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanServer.js +++ b/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanServer.js @@ -152,13 +152,30 @@ function loadLimitableFields(){ var script = new Array(); for ( var i = 0; i < data.length; i++) script.push(data[i]); + var tbodyNode = document.getElementById("loadConfig2").children[0]; 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); + var tdNode = document.createElement("td"); + var tdNode2 = document.createElement("td"); + var inputNode = document.createElement("input"); + inputNode.setAttribute("name", script[j]); + 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(){ diff --git a/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js b/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js index fc2f1530..b38fece6 100644 --- a/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js +++ b/Bench4Q-Web/src/main/webapp/script/TestPlan/TestPlanUI.js @@ -181,8 +181,8 @@ function loadSchedulePlot2() { 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]); + time += TimeInterval; } var chart = new Highcharts.Chart(options); diff --git a/Bench4Q-Web/src/main/webapp/test.jsp b/Bench4Q-Web/src/main/webapp/test.jsp index ad9d69b7..dd964734 100644 --- a/Bench4Q-Web/src/main/webapp/test.jsp +++ b/Bench4Q-Web/src/main/webapp/test.jsp @@ -150,34 +150,12 @@ body {
- - - - - - - - - - - - - - - - -
cpu
%
-
- - - + + +