From 9f0b1dfca0fe800b8ac5c94d83df3a0c782d59ee Mon Sep 17 00:00:00 2001 From: David Cramer Date: Mon, 28 Mar 2011 17:34:07 -0700 Subject: Add a note when no SQL queries are logged --- .../templates/debug_toolbar/panels/sql.html | 130 +++++++++++---------- 1 file changed, 67 insertions(+), 63 deletions(-) (limited to 'debug_toolbar/templates') diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index 8560da0..bec97a4 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -10,68 +10,72 @@ - - - - - - - - - - - - {% for query in queries %} - - - - - - - +{% if queries %} +
 {% trans 'Query' %}{% trans 'Timeline' %}{% trans 'Time (ms)' %}{% trans "Action" %}
  - + - -
-
{{ query.sql|safe }}
-
-
-
{{ query.width_ratio }}%
-
- {{ query.duration|floatformat:"2" }} - - {% if query.params %} - {% if query.is_select %} - Sel - Expl - {% if is_mysql %} - Prof - {% endif %} - {% endif %} - {% endif %} -
+ + + + + + + - - - + + {% for query in queries %} + + + + + + + - - {% endfor %} - -
 {% trans 'Query' %}{% trans 'Timeline' %}{% trans 'Time (ms)' %}{% trans "Action" %}
-
-

Connection: {{ query.alias }}

- {% if query.stacktrace %} -
{{ query.stacktrace }}
- {% endif %} - {% if query.template_info %} - - {% for line in query.template_info.context %} - - - - - {% endfor %} -
{{ line.num }}{{ line.content }}
-

{{ query.template_info.name|default:"(unknown)" }}

+
  + + + +
+
{{ query.sql|safe }}
+
+
+
{{ query.width_ratio }}%
+
+ {{ query.duration|floatformat:"2" }} + + {% if query.params %} + {% if query.is_select %} + Sel + Expl + {% if is_mysql %} + Prof + {% endif %} {% endif %} - -
+ {% endif %} + + + + + +
+

Connection: {{ query.alias }}

+ {% if query.stacktrace %} +
{{ query.stacktrace }}
+ {% endif %} + {% if query.template_info %} + + {% for line in query.template_info.context %} + + + + + {% endfor %} +
{{ line.num }}{{ line.content }}
+

{{ query.template_info.name|default:"(unknown)" }}

+ {% endif %} +
+ + + {% endfor %} + + +{% else %} +

No SQL queries were recorded during this request.

+{% endif %} \ No newline at end of file -- cgit v1.2.3