forked from sideroad/grunt-wpt-page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
211 lines (203 loc) · 9.66 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' href='build/build.css'>
<title>Grunt WebPageTest</title>
</head>
<body data-spy="scroll" data-target=".nav-graph">
<div class="container">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand" href="#">Grunt WebPageTest</a>
</div>
<div class="pull-right" style="padding-top: 5px;">
<ul class="nav nav-pills">
<li><a href="#responseTime">Response Time</a></li>
<li><a href="#contentsSize">Contents Size</a></li>
<li><a href="#contentsRequests">Contents Requests</a></li>
</ul>
</div>
</div>
</nav>
</div>
<div id="app" class="container">
<div class="row">
<div class="col-md-8">
<h2>URL</h2>
<select id="urls" class="form-control" v-model="url" >
<option v-repeat="urls" value="{{$key}}" >{{$key}}</option>
</select>
</div>
<div class="col-md-4">
<h2>Location</h2>
<select id="locations" class="form-control" v-model="location" >
<option v-repeat="locations" value="{{$key}}" >{{$value}}</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2 id="responseTime" >Response Time</h2>
<div class="col-md-6">
<h3>FirstView</h3>
<h4>Average</h4>
<div id="firstAverage" class="graphs"></div>
<div id="firstAverageLegend" class="legend"></div>
<h4>Median</h4>
<div id="firstMedian" class="graphs"></div>
<div id="firstMedianLegend" class="legend"></div>
</div>
<div class="col-md-6">
<h3>RepeatView</h3>
<h4>Average</h4>
<div id="repeatAverage" class="graphs"></div>
<div id="repeatAverageLegend" class="legend"></div>
<h4>Median</h4>
<div id="repeatMedian" class="graphs"></div>
<div id="repeatMedianLegend" class="legend"></div>
</div>
</div>
<div class="col-md-12">
<h3>Detail</h3>
<h4>Average</h4>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th rowspan="2">Date</th>
<th rowspan="2">ID</th>
<th colspan="2">FirstView</th>
<th colspan="2">RepeatView</th>
</tr>
<tr>
<th v-repeat="labels.responseTime.average">{{$value}}</th>
<th v-repeat="labels.responseTime.average">{{$value}}</th>
</tr>
</thead>
<tbody id="averageTable">
<tr v-repeat="tests" >
<td>{{response.data.completed}}</td>
<td><a v-attr="href: response.data.summary">{{response.data.testId}}</a></td>
<td v-repeat="labels.responseTime.average">{{response.data.average.firstView[$key] | ms}}</td>
<td v-repeat="labels.responseTime.average">{{response.data.average.repeatView[$key] | ms}}</td>
</tr>
</tbody>
</table>
<h4>Median</h4>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th rowspan="2">Date</th>
<th rowspan="2">ID</th>
<th colspan="6">FirstView</th>
<th colspan="6">RepeatView</th>
</tr>
<tr>
<th v-repeat="labels.responseTime.median">{{$value}}</th>
<th v-repeat="labels.responseTime.median">{{$value}}</th>
</tr>
</thead>
<tbody id="medianTable">
<tr v-repeat="tests">
<td>{{response.data.completed}}</td>
<td><a v-attr="href: response.data.summary">{{response.data.testId}}</a></td>
<td v-repeat="labels.responseTime.median">{{response.data.median.firstView[$key] | ms}}</td>
<td v-repeat="labels.responseTime.median">{{response.data.median.repeatView[$key] | ms}}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-12">
<h2 id="contentsSize" >Contents Size</h2>
<div class="col-md-6">
<h3>FirstView</h3>
<div id="firstContentsSize" class="graphs"></div>
<div id="firstContentsSizeLegend" class="legend"></div>
</div>
<div class="col-md-6">
<h3>RepeatView</h3>
<div id="repeatContentsSize" class="graphs"></div>
<div id="repeatContentsSizeLegend" class="legend"></div>
</div>
</div>
<div class="col-md-12">
<h3>Detail</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th rowspan="2">Date</th>
<th rowspan="2">ID</th>
<th colspan="8">FirstView</th>
<th colspan="8">RepeatView</th>
</tr>
<tr>
<th>Total</th>
<th v-repeat="labels.contents">{{$value}}</th>
<th>Total</th>
<th v-repeat="labels.contents">{{$value}}</th>
</tr>
</thead>
<tbody id="contentsSizeTable">
<tr v-repeat="tests" >
<td>{{response.data.completed}}</td>
<td><a v-attr="href: response.data.summary">{{response.data.testId}}</a></td>
<td>{{response.data.median.firstView.breakdown | totalBytes | KB}}</td>
<td v-repeat="labels.contents" >{{response.data.median.firstView.breakdown[$key].bytes | KB}}</td>
<td>{{response.data.median.repeatView.breakdown | totalBytes | KB}}</td>
<td v-repeat="labels.contents" >{{response.data.median.repeatView.breakdown[$key].bytes | KB}}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-12">
<h2 id="contentsRequests" >Contents Requests</h2>
<div class="col-md-6">
<h3>FirstView</h3>
<div id="firstContentsRequests" class="graphs"></div>
<div id="firstContentsRequestsLegend" class="legend"></div>
</div>
<div class="col-md-6">
<h3>RepeatView</h3>
<div id="repeatContentsRequests" class="graphs"></div>
<div id="repeatContentsRequestsLegend" class="legend"></div>
</div>
</div>
<div class="col-md-12">
<h3>Detail</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th rowspan="2">Date</th>
<th rowspan="2">ID</th>
<th colspan="8">FirstView</th>
<th colspan="8">RepeatView</th>
</tr>
<tr>
<th>Total</th>
<th v-repeat="labels.contents">{{$value}}</th>
<th>Total</th>
<th v-repeat="labels.contents">{{$value}}</th>
</tr>
</thead>
<tbody id="contentsRequestsTable">
<tr v-repeat="tests" >
<td>{{response.data.completed}}</td>
<td><a v-attr="href: response.data.summary">{{response.data.testId}}</a></td>
<td>{{response.data.median.firstView.breakdown | totalRequests }}</td>
<td v-repeat="labels.contents" >{{response.data.median.firstView.breakdown[$key].requests }}</td>
<td>{{response.data.median.repeatView.breakdown | totalRequests }}</td>
<td v-repeat="labels.contents" >{{response.data.median.repeatView.breakdown[$key].requests }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script src='build/lib.js'></script>
<script src='build/build.js'></script>
<script>
require('grunt-wpt-page')
</script>
</body>
</html>