rack-mini-profiler 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +13 -4
- data/lib/html/dot.1.1.2.min.js +2 -0
- data/lib/html/includes.css +102 -34
- data/lib/html/includes.js +2191 -1008
- data/lib/html/includes.scss +515 -441
- data/lib/html/includes.tmpl +138 -148
- data/lib/html/share.html +0 -1
- data/lib/mini_profiler/asset_version.rb +3 -2
- data/lib/mini_profiler/config.rb +4 -4
- data/lib/mini_profiler/profiler.rb +34 -10
- data/lib/mini_profiler/storage/file_store.rb +1 -1
- data/lib/mini_profiler/version.rb +1 -1
- data/lib/mini_profiler_rails/railtie.rb +2 -0
- data/rack-mini-profiler.gemspec +3 -1
- metadata +5 -9
- data/lib/html/jquery.1.7.1.js +0 -4
- data/lib/html/jquery.tmpl.js +0 -486
- data/lib/html/list.css +0 -9
- data/lib/html/list.js +0 -38
- data/lib/html/list.tmpl +0 -34
data/lib/html/list.css
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
tbody tr:nth-child(odd) { background-color:#eee; }
|
2
|
-
tbody tr:nth-child(even) { background-color:#fff; }
|
3
|
-
table { border: 0; border-spacing:0;}
|
4
|
-
tr {border: 0;}
|
5
|
-
.date {font-size: 11px; color: #666;}
|
6
|
-
td {padding: 8px;}
|
7
|
-
.time {text-align:center;}
|
8
|
-
thead tr {background-color: #bbb; color: #444; font-size: 12px;}
|
9
|
-
thead tr th { padding: 5px 15px;}
|
data/lib/html/list.js
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
var MiniProfiler = MiniProfiler || {};
|
2
|
-
MiniProfiler.list = {
|
3
|
-
init:
|
4
|
-
function (options) {
|
5
|
-
var $ = MiniProfiler.jQuery;
|
6
|
-
var opt = options || {};
|
7
|
-
|
8
|
-
var updateGrid = function (id) {
|
9
|
-
$.ajax({
|
10
|
-
url: options.path + 'results-list',
|
11
|
-
data: { "last-id": id },
|
12
|
-
dataType: 'json',
|
13
|
-
type: 'GET',
|
14
|
-
success: function (data) {
|
15
|
-
$('table tbody').append($("#rowTemplate").tmpl(data));
|
16
|
-
var oldId = id;
|
17
|
-
var oldData = data;
|
18
|
-
setTimeout(function () {
|
19
|
-
var newId = oldId;
|
20
|
-
if (oldData.length > 0) {
|
21
|
-
newId = oldData[oldData.length - 1].Id;
|
22
|
-
}
|
23
|
-
updateGrid(newId);
|
24
|
-
}, 4000);
|
25
|
-
}
|
26
|
-
});
|
27
|
-
}
|
28
|
-
|
29
|
-
MiniProfiler.path = options.path;
|
30
|
-
$.get(options.path + 'list.tmpl?v=' + options.version, function (data) {
|
31
|
-
if (data) {
|
32
|
-
$('body').append(data);
|
33
|
-
$('body').append($('#tableTemplate').tmpl());
|
34
|
-
updateGrid();
|
35
|
-
}
|
36
|
-
});
|
37
|
-
}
|
38
|
-
};
|
data/lib/html/list.tmpl
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
<script id="tableTemplate" type="text/x-jquery-tmpl">
|
2
|
-
<table>
|
3
|
-
<thead>
|
4
|
-
<tr>
|
5
|
-
<th>Name</th>
|
6
|
-
<th>Started</th>
|
7
|
-
<th>Sql Duration</th>
|
8
|
-
<th>Total Duration</th>
|
9
|
-
<th>Request Start</th>
|
10
|
-
<th>Response Start</th>
|
11
|
-
<th>Dom Complete</th>
|
12
|
-
</tr>
|
13
|
-
</thead>
|
14
|
-
<tbody>
|
15
|
-
|
16
|
-
</tbody>
|
17
|
-
</table>
|
18
|
-
</script>
|
19
|
-
<script id="rowTemplate" type="text/x-jquery-tmpl">
|
20
|
-
<tr>
|
21
|
-
<td>
|
22
|
-
<a href="${MiniProfiler.path}results?id=${id}">${name}</a></td>
|
23
|
-
<td class="date">${MiniProfiler.renderDate(started)}</td>
|
24
|
-
<td class="time">${duration_milliseconds_in_sql}</td>
|
25
|
-
<td class="time">${duration_milliseconds}</td>
|
26
|
-
{{if client_timings}}
|
27
|
-
<td class="time">${MiniProfiler.getClientTimingByName(client_timings,"Request").start}</td>
|
28
|
-
<td class="time">${MiniProfiler.getClientTimingByName(client_timings,"Response").start}</td>
|
29
|
-
<td class="time">${MiniProfiler.getClientTimingByName(client_timings,"Dom Complete").start}</td>
|
30
|
-
{{else}}
|
31
|
-
<td colspan="3"></td>
|
32
|
-
{{/if}}
|
33
|
-
</tr>
|
34
|
-
</script>
|