-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.jinja2
46 lines (46 loc) · 1.21 KB
/
template.jinja2
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
<!doctype html>
<html>
<head>
<title>traceface</title>
<link rel="stylesheet" href="{{ static_path }}style.css">
<script src="{{ static_path }}frames.js"></script>
</head>
<body>
<div class="error">{{ error }}</div>
<button id="expand-all">expand all</button>
<button id="collapse-all">collapse all</button>
{% for frame in trace %}
<div class="frame" style="padding-left: {{ 50 * frame.depth }}px" data-depth="{{ frame.depth }}">
<p>
<b>{{frame.func_name}}</b>
({{ frame.filepath }}:{{ frame.line_no}})
</p>
{% if frame.context_lines %}
<code>
{%- for line in frame.context_lines %}
{% if loop.index0 == frame.def_index -%}
<span class="def">{{ line }}</span>
{% elif loop.index0 == frame.call_index -%}
<span class="call">{{ line }}</span>
{% else -%}
{{ line }}
{% endif %}
{% endfor -%}
</code>
{% endif %}
<table class="local-vars">
<tr>
<th>Local variable</th>
<th>Value</th>
</tr>
{% for key, value in frame.local_vars.items() %}
<tr>
<td>{{ key }}</td>
<td>{{ value }}</td>
</tr>
{% endfor %}
</table>
</div>
{% endfor %}
</body>
</html>