aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/templates
diff options
context:
space:
mode:
authorAlex Gaynor2009-03-21 12:17:05 -0400
committerAlex Gaynor2009-03-21 12:17:05 -0400
commit4ffe14db039981d06aa58f3ad3c2b3472824961b (patch)
treeb6a94348f2c20bfb6c29303227889d70f06c62c3 /debug_toolbar/templates
parent0fea345f0d59ed0f17f29e59072f34d7d016abde (diff)
parent8c64bb0cc82c6129b4ab14ff4cc80880761680d4 (diff)
downloaddjango-debug-toolbar-4ffe14db039981d06aa58f3ad3c2b3472824961b.tar.bz2
resoled merge conflicts
Diffstat (limited to 'debug_toolbar/templates')
-rw-r--r--debug_toolbar/templates/debug_toolbar/base.html11
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/headers.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/logger.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/request_vars.html6
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/settings_vars.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql.html12
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql_explain.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql_profile.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/sql_select.html2
-rw-r--r--debug_toolbar/templates/debug_toolbar/panels/timer.html21
10 files changed, 47 insertions, 15 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html
index a6c8aef..7277620 100644
--- a/debug_toolbar/templates/debug_toolbar/base.html
+++ b/debug_toolbar/templates/debug_toolbar/base.html
@@ -9,9 +9,13 @@
@import url({{ BASE_URL }}/__debug__/m/toolbar.min.css);
</style>
<div id="djDebug">
- <div id="djDebugToolbar">
+ <div style="display: none;" id="djDebugToolbar">
<ul id="djDebugPanelList">
+ {% if panels %}
+ <li><a id="djHideToolBarButton" href="#" title="Hide Toolbar">&laquo; Hide</a></li>
+ {% else %}
<li id="djDebugButton">DEBUG</li>
+ {% endif %}
{% for panel in panels %}
<li>
{% if panel.has_content %}
@@ -23,6 +27,11 @@
{% endfor %}
</ul>
</div>
+ <div style="display: none;" id="djDebugToolbarHandle">
+ <ul id="djDebugPanelList">
+ <li><a title="Show Toolbar" id="djShowToolBarButton" href="#">&raquo;</a></li>
+ </ul>
+ </div>
{% for panel in panels %}
{% if panel.has_content %}
<div id="{{ panel.dom_id }}" class="panelContent">
diff --git a/debug_toolbar/templates/debug_toolbar/panels/headers.html b/debug_toolbar/templates/debug_toolbar/panels/headers.html
index 3ac7fd3..005ffe6 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/headers.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/headers.html
@@ -8,7 +8,7 @@
</thead>
<tbody>
{% for key, value in headers.iteritems %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/logger.html b/debug_toolbar/templates/debug_toolbar/panels/logger.html
index c079065..2117529 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/logger.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/logger.html
@@ -11,7 +11,7 @@
</thead>
<tbody>
{% for record in records %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ record.level }}</td>
<td>{{ record.time|date:"h:i:s m/d/Y" }}</td>
<td>{{ record.message }}</td>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
index fe317ae..b7d53ee 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/request_vars.html
@@ -13,7 +13,7 @@
</thead>
<tbody>
{% for key, value in cookies %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
@@ -38,7 +38,7 @@
</thead>
<tbody>
{% for key, value in session %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
@@ -59,7 +59,7 @@
</thead>
<tbody>
{% for key, value in get %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|join:", "|escape }}</td>
</tr>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
index 1d332bf..93f0b34 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/settings_vars.html
@@ -8,7 +8,7 @@
</thead>
<tbody>
{% for var in settings.items|dictsort:"0" %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ var.0 }}</td>
<td><code>{{ var.1|pprint }}</code></td>
</tr>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html
index d35d83e..0c8e9c3 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html
@@ -9,13 +9,15 @@
</thead>
<tbody>
{% for query in queries %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td>{{ query.time|floatformat:"4" }}</td>
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
+ <td>{{ query.time|floatformat:"2" }}</td>
<td>
{% if query.params %}
- <a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}&hash={{ query.hash }}">SELECT</a>
- <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a>
- <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"4"|urlencode }}&hash={{ query.hash }}">PROFILE</a>
+ <a class="remoteCall" href="/__debug__/sql_select/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">SELECT</a>
+ <a class="remoteCall" href="/__debug__/sql_explain/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">EXPLAIN</a>
+ {% if is_mysql %}
+ <a class="remoteCall" href="/__debug__/sql_profile/?sql={{ query.raw_sql|urlencode }}&params={{ query.params|urlencode }}&time={{ query.time|floatformat:"2"|urlencode }}&hash={{ query.hash }}">PROFILE</a>
+ {% endif %}
{% endif %}
</td>
<td class="syntax">{{ query.sql|safe }}</td>
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
index dc306f0..a163b25 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql_explain.html
@@ -16,7 +16,7 @@
</thead>
<tbody>
{% for row in result %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html
index c1d04ce..e46f41d 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql_profile.html
@@ -16,7 +16,7 @@
</thead>
<tbody>
{% for row in result %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql_select.html b/debug_toolbar/templates/debug_toolbar/panels/sql_select.html
index 73109ef..17e7d48 100644
--- a/debug_toolbar/templates/debug_toolbar/panels/sql_select.html
+++ b/debug_toolbar/templates/debug_toolbar/panels/sql_select.html
@@ -17,7 +17,7 @@
</thead>
<tbody>
{% for row in result %}
- <tr class="{% cycle 'odd' 'even' %}">
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
diff --git a/debug_toolbar/templates/debug_toolbar/panels/timer.html b/debug_toolbar/templates/debug_toolbar/panels/timer.html
new file mode 100644
index 0000000..831ff86
--- /dev/null
+++ b/debug_toolbar/templates/debug_toolbar/panels/timer.html
@@ -0,0 +1,21 @@
+<h3>Resource Usage</h3>
+<table>
+ <colgroup>
+ <col style="width:20%"/>
+ <col/>
+ </colgroup>
+ <thead>
+ <tr>
+ <th>Key</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for key, value in rows %}
+ <tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
+ <td>{{ key|escape }}</td>
+ <td>{{ value|escape }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>