提交 ab3de0c4 编写于 作者: S sean.wang

add domain links

上级 8733acd9
......@@ -59,9 +59,8 @@ public class TransactionReportAnalyzer extends AbstractMessageAnalyzer<Transacti
if (report == null) {
return report;
}
Collection<TransactionType> types = report.getTypes().values();
for (TransactionType type : types) {
for (TransactionType type : report.getTypes().values()) {
long typeCount = 0;
long typeFailCount = 0;
double typeSum = 0;
......@@ -119,10 +118,15 @@ public class TransactionReportAnalyzer extends AbstractMessageAnalyzer<Transacti
@Override
public TransactionReport generate(String domain) {
if(domain == null) {
domain = (String)this.m_reports.keySet().toArray()[0];
ArrayList<String> domains = new ArrayList<String>(this.m_reports.keySet());
if (domain == null) {
domain = domains.get(0);
}
return computeMeanSquareDeviation(domain);
TransactionReport report = computeMeanSquareDeviation(domain);
for (String ele : domains) {
report.addDomain(ele);
}
return report;
}
private String getTransactionFileName(TransactionReport report) {
......
......@@ -2,6 +2,7 @@
<model>
<entity name="transaction-report" root="true">
<attribute name="domain" value-type="String" />
<element name="domain" value-type="String" type="set"/>
<attribute name="startTime" value-type="Date" format="yyyy-MM-dd HH:mm:ss" />
<attribute name="endTime" value-type="Date" format="yyyy-MM-dd HH:mm:ss" />
<entity-ref name="type" type="list" names="types" />
......
......@@ -11,7 +11,10 @@ $(function(){
);
$(function()
{
{
domainlinks = 'Domains ';
$.each(data.domainSet, function(i, t){domainlinks += "[ <a href=\"/cat/r/t?domain="+t+"\">"+t+"</a> ]"});
$("#domainlist").html(domainlinks);
$("#gridTable").jqGrid({
datatype: "local",
colNames:['Type', 'Total Count', 'Fail Count', 'Failure%', 'Sample Link', 'Min/Max/Avg/Std(ms)'],
......
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="a" uri="/WEB-INF/app.tld"%>
<%@ taglib prefix="res" uri="http://www.ebay.com/webres"%>
<jsp:useBean id="ctx" type="com.dianping.cat.report.page.transaction.Context" scope="request"/>
<jsp:useBean id="payload" type="com.dianping.cat.report.page.transaction.Payload" scope="request"/>
<jsp:useBean id="model" type="com.dianping.cat.report.page.transaction.Model" scope="request"/>
<jsp:useBean id="ctx"
type="com.dianping.cat.report.page.transaction.Context" scope="request" />
<jsp:useBean id="payload"
type="com.dianping.cat.report.page.transaction.Payload" scope="request" />
<jsp:useBean id="model"
type="com.dianping.cat.report.page.transaction.Model" scope="request" />
<a:body>
<res:useCss value='${res.css.local.default_css}' target="head-css"/>
<res:useCss value='${res.css.local.jquery_css}' target="head-css"/>
<res:useCss value='${res.css.local.jqgrid_css}' target="head-css"/>
<res:useCss value='${res.css.local.default_css}' target="head-css" />
<res:useCss value='${res.css.local.jquery_css}' target="head-css" />
<res:useCss value='${res.css.local.jqgrid_css}' target="head-css" />
<res:useJs value='${res.js.local.jquery_min_js}' target="head-js"/>
<res:useJs value='${res.js.local.jquery_ui_min_js}' target="head-js"/>
<res:useJs value='${res.js.local.grid_js}' target="head-js"/>
<res:useJs value='${res.js.local.jqgrid_min_js}' target="head-js"/>
<res:useJs value='${res.js.local.jquery_min_js}' target="head-js" />
<res:useJs value='${res.js.local.jquery_ui_min_js}' target="head-js" />
<res:useJs value='${res.js.local.grid_js}' target="head-js" />
<res:useJs value='${res.js.local.jqgrid_min_js}' target="head-js" />
<script type="text/javascript">
var data = ${model.reportInJson};
</script>
<script type="text/javascript">
var data = ${model.reportInJson};
</script>
<table width="100%" border="0" cellpadding="6" cellspacing="0"
class="navbar">
<tbody>
<tr>
<td id="domainlist" nowrap="nowrap" align="left" class="seealso">
</td>
</tr>
</tbody>
</table>
<table id="gridTable"></table>
<div id="gridPager"></div>
<table id="gridTable"></table>
<div id="gridPager"></div>
<res:useJs value="${res.js.local.transaction_js}" target="bottom-js"/>
<res:useJs value="${res.js.local.transaction_js}" target="bottom-js" />
</a:body>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册