Skip to content

Commit 89ba235

Browse files
committed
Fix query times; comment unused template features
1 parent 2a9d280 commit 89ba235

File tree

2 files changed

+9
-5
lines changed
  • django_mongodb_extensions

2 files changed

+9
-5
lines changed

django_mongodb_extensions/debug_toolbar/panels/mql/tracking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def log(self, op, duration, args, kwargs=None):
3636
{
3737
"alias": self.db.alias,
3838
"sql": operation,
39-
"time": "%.3f" % duration,
39+
"duration": "%.3f" % duration,
4040
}
4141
)
4242
self.logger._databases[self.db.alias] = {

django_mongodb_extensions/templates/debug_toolbar/panels/mql.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
<colgroup>
2424
<col>
2525
<col>
26-
<col>
27-
<col class="djdt-width-30">
26+
{% comment %}<col>{% endcomment %}
2827
<col>
2928
<col>
29+
{% comment %}<col>{% endcomment %}
3030
</colgroup>
3131
<thead>
3232
<tr>
3333
<th></th>
3434
<th colspan="2">{% translate "Query" %}</th>
35-
<th>{% translate "Timeline" %}</th>
35+
{% comment %}<th>{% translate "Timeline" %}</th>{% endcomment %}
3636
<th>{% translate "Time (ms)" %}</th>
37-
<th>{% translate "Action" %}</th>
37+
{% comment %}<th>{% translate "Action" %}</th>{% endcomment %}
3838
</tr>
3939
</thead>
4040
<tbody>
@@ -59,6 +59,7 @@
5959
</strong>
6060
{% endif %}
6161
</td>
62+
{% comment %}
6263
<td>
6364
<svg class="djDebugLineChart{% if query.is_slow %} djDebugLineChartWarning{% endif %}{% if query.in_trans %} djDebugLineChartInTransaction{% endif %}" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 5" preserveAspectRatio="none" aria-label="{{ query.width_ratio }}%">
6465
<rect x="{{ query.start_offset|unlocalize }}" y="0" height="5" width="{{ query.width_ratio|unlocalize }}" fill="{{ query.trace_color }}" />
@@ -70,9 +71,11 @@
7071
{% endif %}
7172
</svg>
7273
</td>
74+
{% endcomment %}
7375
<td class="djdt-time">
7476
{{ query.duration|floatformat:"2" }}
7577
</td>
78+
{% comment %}
7679
<td class="djdt-actions">
7780
{% if query.params %}
7881
{% if query.is_select %}
@@ -87,6 +90,7 @@
8790
{% endif %}
8891
{% endif %}
8992
</td>
93+
{% endcomment %}
9094
</tr>
9195
<tr class="djUnselected {% if query.is_slow %} djDebugRowWarning{% endif %} djToggleDetails_{{ forloop.counter }}" id="sqlDetails_{{ forloop.counter }}">
9296
<td colspan="2"></td>

0 commit comments

Comments
 (0)