Skip to content

Commit 83a01d9

Browse files
committed
Improve and simplify the "stats" CSS on the SQL panel
The previous version was misaligned and could sometimes display an awkwardly placed list bullet point. The end result is simpler/less CSS.
1 parent 7ecd3c1 commit 83a01d9

File tree

2 files changed

+12
-34
lines changed

2 files changed

+12
-34
lines changed

debug_toolbar/static/debug_toolbar/css/toolbar.css

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -438,27 +438,6 @@
438438
stroke: #94b24d;
439439
}
440440

441-
#djDebug .djdt-panelContent ul.djdt-stats {
442-
position: relative;
443-
list-style-type: none;
444-
}
445-
#djDebug .djdt-panelContent ul.djdt-stats li {
446-
width: 30%;
447-
float: left;
448-
}
449-
#djDebug .djdt-panelContent ul.djdt-stats li strong.djdt-label {
450-
display: block;
451-
}
452-
#djDebug .djdt-panelContent ul.djdt-stats li span.djdt-color {
453-
height: 12px;
454-
width: 3px;
455-
display: inline-block;
456-
}
457-
#djDebug .djdt-panelContent ul.djdt-stats li span.djdt-info {
458-
display: block;
459-
padding-left: 5px;
460-
}
461-
462441
#djDebug .djdt-panelContent thead th {
463442
white-space: nowrap;
464443
}

debug_toolbar/templates/debug_toolbar/panels/sql.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{% load i18n l10n %}
22
<div class="djdt-clearfix">
3-
<ul class="djdt-stats">
3+
<ul>
44
{% for alias, info in databases %}
55
<li>
6-
<strong class="djdt-label"><span style="background-color:rgb({{ info.rgb_color|join:', ' }})" class="djdt-color">&#160;</span> {{ alias }}</strong>
7-
<span class="djdt-info">{{ info.time_spent|floatformat:"2" }} ms ({% blocktrans count info.num_queries as num %}{{ num }} query{% plural %}{{ num }} queries{% endblocktrans %}
8-
{% if info.similar_count %}
9-
{% blocktrans with count=info.similar_count trimmed %}
10-
including <abbr title="Similar queries are queries with the same SQL, but potentially different parameters.">{{ count }} similar</abbr>
6+
<strong><span style="background-color:rgb({{ info.rgb_color|join:', ' }})" class="djdt-color">&#160;</span> {{ alias }}</strong>
7+
{{ info.time_spent|floatformat:"2" }} ms ({% blocktrans count info.num_queries as num %}{{ num }} query{% plural %}{{ num }} queries{% endblocktrans %}
8+
{% if info.similar_count %}
9+
{% blocktrans with count=info.similar_count trimmed %}
10+
including <abbr title="Similar queries are queries with the same SQL, but potentially different parameters.">{{ count }} similar</abbr>
11+
{% endblocktrans %}
12+
{% if info.duplicate_count %}
13+
{% blocktrans with dupes=info.duplicate_count trimmed %}
14+
and <abbr title="Duplicate queries are identical to each other: they execute exactly the same SQL and parameters.">{{ dupes }} duplicates</abbr>
1115
{% endblocktrans %}
12-
{% if info.duplicate_count %}
13-
{% blocktrans with dupes=info.duplicate_count trimmed %}
14-
and <abbr title="Duplicate queries are identical to each other: they execute exactly the same SQL and parameters.">{{ dupes }} duplicates</abbr>
15-
{% endblocktrans %}
16-
{% endif %}
17-
{% endif %})
18-
</span>
16+
{% endif %}
17+
{% endif %})
1918
</li>
2019
{% endfor %}
2120
</ul>

0 commit comments

Comments
 (0)