Skip to content

Commit 8b761ce

Browse files
committed
use djdt default toggle element instead of custom made
1 parent 212a218 commit 8b761ce

File tree

1 file changed

+18
-13
lines changed
  • template_profiler_panel/templates/template_profiler_panel

1 file changed

+18
-13
lines changed

template_profiler_panel/templates/template_profiler_panel/template.html

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,47 @@ <h4>{{ templates|length }} {% trans 'calls to Template.render()' %}</h4>
33
<div>
44
<table>
55
<colgroup>
6+
<col style="width:1%" />
67
<col style="width:5%" />
78
<col style="width:10%" />
8-
<col style="width:1%" />
99
<col style="width:60%" />
1010
<col style="width:5%" />
1111
</colgroup>
1212
<thead>
1313
<tr>
14+
<th></th>
1415
<th>{% trans 'Stack Level' %}</th>
1516
<th>{% trans 'Template Name' %}</th>
16-
<th>{% trans 'Trace' %}</th>
1717
<th>{% trans 'Timeline' %}</th>
1818
<th>{% trans 'Time (ms)' %}</th>
1919
</tr>
2020
</thead>
2121
<tbody>
2222
{% for template in templates %}
23-
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
23+
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}" id="profileMain_{{ forloop.counter }}">
24+
<td class="djdt-toggle">
25+
<button type="button" class="djToggleSwitch" data-toggle-name="profileMain" data-toggle-id="{{ forloop.counter }}">+</button>
26+
</td>
2427
<td>
2528
<div style="background-color: {{ template.color.bg }}; color: {{ template.color.text }}; width: {{ template.level }}px; margin-right: 4px; padding-left: 2px;">{{ template.level }}</div>
2629
</td>
2730
<td>{{ template.name }}</td>
28-
<td>
29-
<a href="javascript:$('.timeline_toggle_{{ forloop.counter }}').toggle();">
30-
<div class="timeline_toggle_{{ forloop.counter }}">&#9658;</div>
31-
<div class="timeline_toggle_{{ forloop.counter }}" style="display: none;">&#9660;</div>
32-
</a>
33-
</td>
3431
<td class="timeline">
3532
<div class="djDebugTimeline" style="position:relative;">
3633
<div class="djDebugLineChart" style="margin-left: {{ template.offset_p|stringformat:'f' }}%;">
3734
<div title="Runtime {{ template.relative_start|floatformat:2 }} - {{ template.relative_end|floatformat:2 }} ms" style="min-width: 1px; width: {{ template.rel_duration_p|stringformat:'f' }}%; background-color: {{ template.color.bg }};">
3835
&nbsp;</div>
3936
</div>
40-
<div style="height: 200px; position:relative; display: none;" class="timeline_toggle_{{ forloop.counter }}">
37+
</div>
38+
</td>
39+
<td>{{ template.time|floatformat }}</td>
40+
</tr>
41+
<tr class="djToggleDetails_{{ forloop.counter }} djUnselected" id="sqlDetails_{{ forloop.counter }}">
42+
<td></td>
43+
<td></td>
44+
<td></td>
45+
<td>
46+
<div style="height: 200px; position:relative;" class="timeline_toggle_{{ forloop.counter }} djToggleDetails_{{ forloop.counter }} djSelected" id="sqlDetails_{{ forloop.counter }}">
4147
{% for time_item in template.processing_timeline %}
4248
<span title="{{ time_item.name }}
4349
Runtime {{ time_item.relative_start|floatformat:2 }} - {{ time_item.relative_end|floatformat:2 }} ms
@@ -56,9 +62,8 @@ <h4>{{ templates|length }} {% trans 'calls to Template.render()' %}</h4>
5662
">&nbsp;</span>
5763
{% endfor %}
5864
</div>
59-
</div>
60-
</td>
61-
<td>{{ template.time|floatformat }}</td>
65+
</td>
66+
<td></td>
6267
</tr>
6368
{% endfor %}
6469
</tbody>

0 commit comments

Comments
 (0)