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.
@@ -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;}
@@ -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
- };
@@ -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>