transactionGroup.jsp
11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<%@ page session="false" language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="a" uri="/WEB-INF/app.tld"%>
<%@ taglib prefix="w" uri="http://www.unidal.org/web/core"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="res" uri="http://www.unidal.org/webres"%>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<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" />
<c:set var="report" value="${model.report}" />
<a:report
title="Transaction Report${empty payload.type ? '' : ' :: '}<a href='?op=groupReport&group=${payload.group}&domain=${model.domain}&date=${model.date}&type=${payload.encodedType}'>${payload.type}</a>"
navUrlPrefix="op=groupReport&group=${payload.group}&queryname=${model.queryName}&domain=${model.domain}${empty payload.type ? '' : '&type='}${payload.encodedType}"
timestamp="${w:format(model.creatTime,'yyyy-MM-dd HH:mm:ss')}">
<jsp:attribute name="subtitle">${w:format(report.startTime,'yyyy-MM-dd HH:mm:ss')} to ${w:format(report.endTime,'yyyy-MM-dd HH:mm:ss')}</jsp:attribute>
<jsp:body>
<res:useJs value="${res.js.local['baseGraph.js']}" target="head-js" />
<table class="machines">
<tr class="left">
<th> [ <c:choose>
<c:when test="${model.ipAddress eq 'All'}">
<a href="?op=view&domain=${model.domain}&date=${model.date}&type=${payload.encodedType}&queryname=${model.queryName}">All</a>
</c:when>
<c:otherwise>
<a href="?op=view&domain=${model.domain}&date=${model.date}&type=${payload.encodedType}&queryname=${model.queryName}">All</a>
</c:otherwise>
</c:choose> ] <c:forEach var="ip" items="${model.ips}">
[
<a href="?op=view&domain=${model.domain}&ip=${ip}&date=${model.date}&type=${payload.encodedType}&queryname=${model.queryName}">${ip}</a>
]
</c:forEach>
</th>
</tr>
</table>
<table class="groups">
<tr class="left">
<th>
<c:forEach var="group" items="${model.groups}">
<c:choose>
<c:when test="${payload.group eq group}">
[
<a class="current"
href="?op=groupReport&domain=${model.domain}&group=${group}&date=${model.date}">${group}</a>
]
</c:when>
<c:otherwise>
[
<a
href="?op=groupReport&domain=${model.domain}&group=${group}&date=${model.date}">${group}</a>
]
</c:otherwise>
</c:choose>
</c:forEach>
</th>
</tr>
</table>
<script type="text/javascript" src="/cat/js/appendHostname.js"></script>
<script type="text/javascript">
$(document).ready(function() {
appendHostname(${model.ipToHostnameStr});
$.each($('table.machines a'), function(index, item) {
var id = $(item).text();
<c:forEach var="ip" items="${model.groupIps}">
group = '${ip}';
if(id.indexOf(group)!=-1){
$(item).addClass('current');
}
</c:forEach>
});
});
</script>
<table class='table table-hover table-striped table-condensed ' >
<c:choose>
<c:when test="${empty payload.type}">
<tr>
<th class="left"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=type">Type</a></th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=total">Total</a></th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=failure">Failure</a></th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=failurePercent">Failure%</a></th>
<th class="right">Sample Link</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=min">Min</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=max">Max</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=avg">Avg</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=95line">95Line</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=99line">99.9Line</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=std">Std</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&sort=total">QPS</a></th>
</tr>
<c:forEach var="item" items="${model.displayTypeReport.results}"
varStatus="status">
<c:set var="e" value="${item.detail}" />
<c:set var="lastIndex" value="${status.index}" />
<tr class=" right">
<td class="left"><a
href="?op=groupGraphs&domain=${report.domain}&date=${model.date}&group=${payload.group}&type=${item.type}"
class="graph_link" data-status="${status.index}">[:: show ::]</a>
<a
href="?op=groupReport&domain=${report.domain}&date=${model.date}&group=${payload.group}&type=${item.type}">${item.detail.id}</a></td>
<td>${w:format(e.totalCount,'#,###,###,###,##0')}</td>
<td>${w:format(e.failCount,'#,###,###,###,##0')}</td>
<td> ${w:format(e.failPercent/100,'0.0000%')}</td>
<td class="center"><a
href="/cat/r/m/${empty e.failMessageUrl ? e.successMessageUrl : e.failMessageUrl}?domain=${model.domain}">Log View</a></td>
<td>${w:format(e.min,'###,##0.#')}</td>
<td>${w:format(e.max,'###,##0.#')}</td>
<td>${w:format(e.avg,'###,##0.0')}</td>
<td>${w:format(e.line95Value,'###,##0.0')}</td>
<td>${w:format(e.line99Value,'###,##0.0')}</td>
<td>${w:format(e.std,'###,##0.0')}</td>
<td>${w:format(e.tps,'###,##0.0')}</td>
</tr>
<tr class="graphs">
<td colspan="13" style="display: none"><div id="${status.index}"
style="display: none"></div></td>
</tr><tr></tr>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<th class="left" colspan="13"><input type="text"
name="queryname" id="queryname" size="40"
value="${model.queryName}">
<input class="btn btn-primary btn-sm" value="Filter"
onclick="selectGroupByName('${model.date}','${model.domain}','${model.ipAddress}','${payload.type}')"
type="submit">
支持多个字符串查询,例如sql|url|task,查询结果为包含任一sql、url、task的列。
</th>
</tr>
<tr>
<th style="text-align: left;"><a href="?op=groupGraphs&domain=${report.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}"
class="graph_link" data-status="-1">[:: show ::]</a>
<a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=type&queryname=${model.queryName}">Name</a></th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=total&queryname=${model.queryName}">Total</a></th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=failure&queryname=${model.queryName}">Failure</a></th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=failurePercent&queryname=${model.queryName}">Failure%</a></th>
<th class="right">Sample Link</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=min&queryname=${model.queryName}">min</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=max&queryname=${model.queryName}">max</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=avg&queryname=${model.queryName}">Avg</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=95line&queryname=${model.queryName}">95Line</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=99line&queryname=${model.queryName}">99.9Line</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=std&queryname=${model.queryName}">Std</a>(ms)</th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=total&queryname=${model.queryName}">QPS</a></th>
<th class="right"><a href="?op=groupReport&domain=${model.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&sort=total&queryname=${model.queryName}">Percent%</a></th>
</tr>
<tr class="graphs">
<td colspan="13" style="display: none"><div id="-1" style="display: none"></div></td>
</tr>
<c:forEach var="item" items="${model.displayNameReport.results}"
varStatus="status">
<c:set var="e" value="${item.detail}" />
<c:set var="lastIndex" value="${status.index}" />
<tr class=" right">
<c:choose>
<c:when test="${status.index > 0}">
<td class="left longText" style="white-space: normal">
<a href="?op=groupGraphs&domain=${report.domain}&date=${model.date}&group=${payload.group}&type=${payload.encodedType}&name=${item.name}"
class="graph_link" data-status="${status.index}">[:: show ::]</a>
${w:shorten(e.id, 120)}</td>
</c:when>
<c:otherwise>
<td class="center" style="white-space: normal">${w:shorten(e.id, 120)}</td>
</c:otherwise>
</c:choose>
<td>${w:format(e.totalCount,'#,###,###,###,##0')}</td>
<td>${w:format(e.failCount,'#,###,###,###,##0')}</td>
<td> ${w:format(e.failPercent/100,'0.0000%')}</td>
<td class="center"><a
href="/cat/r/m/${empty e.failMessageUrl ? e.successMessageUrl : e.failMessageUrl}?domain=${model.domain}">Log View</a></td>
<td>${w:format(e.min,'###,##0.#')}</td>
<td>${w:format(e.max,'###,##0.#')}</td>
<td>${w:format(e.avg,'###,##0.0')}</td>
<c:choose>
<c:when test="${status.index > 0}">
<td>${w:format(e.line95Value,'###,##0.0')}</td>
<td>${w:format(e.line99Value,'###,##0.0')}</td>
</c:when>
<c:otherwise>
<td class="center">-</td>
<td class="center">-</td>
</c:otherwise>
</c:choose>
<td>${w:format(e.std,'###,##0.0')}</td>
<td>${w:format(e.tps,'###,##0.0')}</td>
<td>${w:format(e.totalPercent,'0.00%')}</td>
</tr>
<tr class="graphs">
<td colspan="13" style="display: none"><div id="${status.index}"
style="display: none"></div></td>
</tr><tr></tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
<font color="white">${lastIndex}</font>
<res:useJs value="${res.js.local.transaction_js}" target="bottom-js" />
<c:choose>
<c:when test="${not empty payload.type}">
<table>
<tr>
<td><div id="transactionGraph" class="pieChart"></div>
</td>
</tr>
</table>
<script type="text/javascript">
var data = ${model.pieChart};
graphPieChart(document.getElementById('transactionGraph'), data);
</script>
</c:when>
</c:choose>
</jsp:body>
</a:report>