bbangert /
dozer
WSGI middleware fork of Robert Brewer's Dowser
Clone URL : http://bitbucket.org/bbangert/dozer/ (size: 146.1 KB)
| commit 40: | 08951cc546be |
| parent 39: | bf668c368e99 |
| branch: | trunk |
missing file
4 months ago
Changed (Δ943 bytes):
raw changeset »
dozer/templates/list_profiles.mako (35 lines added, 0 lines removed)
Up to file-list dozer/templates/list_profiles.mako:
1 |
<%inherit file="layout.mako"/> |
|
2 |
<h1>All Profiles</h1> |
|
3 |
<a href="/_profiler/delete">Delete all</a> |
|
4 |
<table> |
|
5 |
<tr> |
|
6 |
<td>URL</td> |
|
7 |
<td>Time</td> |
|
8 |
<td>Profile ID</td> |
|
9 |
</tr> |
|
10 |
% for created_time, environ, profile_id in profiles: |
|
11 |
<tr pid="${profile_id}"> |
|
12 |
<td>${environ['SCRIPT_NAME'] + environ['PATH_INFO'] + environ['QUERY_STRING']|h}</td> |
|
13 |
<td>${'%i' % int(now-created_time)} seconds ago</td> |
|
14 |
<td><a href="/_profiler/show/${profile_id}">${profile_id}</a></td> |
|
15 |
<td><a href="/_profiler/delete/${profile_id}" class="delete">delete</a></td> |
|
16 |
</tr> |
|
17 |
% endfor |
|
18 |
</table> |
|
19 |
||
20 |
<%def name="javascript()"> |
|
21 |
${parent.javascript()} |
|
22 |
<script> |
|
23 |
$(".delete").click(function() { |
|
24 |
tr = $(this).parent().parent(); |
|
25 |
$.ajax({ |
|
26 |
type: "POST", |
|
27 |
url: "/_profiler/delete/"+tr.attr("pid"), |
|
28 |
success: function(msg){ |
|
29 |
tr.remove(); |
|
30 |
} |
|
31 |
}); |
|
32 |
return false; |
|
33 |
}); |
|
34 |
</script> |
|
35 |
</%def> |
