diff --git a/Bench4Q-Recorder/RecordScriptTestCase/baidu.html b/Bench4Q-Recorder/RecordScriptTestCase/baidu.html deleted file mode 100644 index 39b0347c..00000000 --- a/Bench4Q-Recorder/RecordScriptTestCase/baidu.html +++ /dev/null @@ -1,88 +0,0 @@ -百度一下,你就知道

显示卡片宝箱换肤消息 设为首页 wonanguo11

加载中,精彩马上呈现
©2014 Baidu 使用百度前必读 京ICP证030173号
+
+

+
+ +
@@ -233,4 +238,4 @@ body { - \ No newline at end of file + diff --git a/Bench4Q-Web/src/main/webapp/script/testResult/pieChart.js b/Bench4Q-Web/src/main/webapp/script/testResult/pieChart.js index 53256e82..03fdfed1 100644 --- a/Bench4Q-Web/src/main/webapp/script/testResult/pieChart.js +++ b/Bench4Q-Web/src/main/webapp/script/testResult/pieChart.js @@ -1,5 +1,10 @@ -var PieChart = function(chartId, title) { +var PiePoint = function(name, count, percentage) { + this.name = name; + this.count = count; + this.percentage = percentage; +} +var PieChart = function(chartId, title) { $('#' + chartId) .highcharts( { @@ -10,7 +15,8 @@ var PieChart = function(chartId, title) { plotShadow : false }, title : { - text : title + text : title, + align: 'left' }, tooltip : { pointFormat : '{series.name}: {point.percentage:.1f} %' @@ -24,7 +30,7 @@ var PieChart = function(chartId, title) { enabled : true, color : '#000000', connectorColor : '#000000', - format : '{point.name}: {point.percentage:.1f} %' + format : '{point.name}: {point.count} ({point.percentage:.1f}%)' } } }, @@ -40,35 +46,41 @@ var PieChart = function(chartId, title) { var UrlContentTypeDistribution = function(containerId, testPlanId) { var pieChart = new PieChart(containerId, "URL content type distribution"); var chart = $("#" + containerId).highcharts(); - var urlPath = [ testPlanId, "urlContentTypePercent" ]; - var url = generateUrl(urlPath); - var i=0; - var intervalId = setInterval(function() { - - $.post(url, "", function(data) { - var dataArray = new Array(); - if(!data.success){ - information(data.failedMessage); - return; - } - - else data=data.data; - - for(var key in data) - dataArray.push([key,data[key]]); - chart.series[0].setData(dataArray); - - - loadItems.urlDistribution=true; - },"json").error(function(){ - information($.i18n.prop('failed-connect-server')); - }); - - if (testStatus == "Complete"&&i>=1) { - clearInterval(intervalId); - return; - } - i++; - - }, 1000); + getUrlContentTypeData(testPlanId, chart); +} + +var addPieData = function(chart,data){ + var points = contentTypeDataFormat(data); + for(var i=0; i