Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle key errors in template.

  • Loading branch information...
commit f50394bc3ebcebeddc9f7a1af56b2ce66ae31cfd 1 parent 6e2c912
Ionel Cristian Mărieș authored
4 src/redisboard/static/redisboard/admin.css
View
@@ -20,3 +20,7 @@
.details td {
width: 50%;
}
+td.error {
+ font-weight: bold;
+ color: #B22222;
+}
6 src/redisboard/templates/redisboard/inspect.html
View
@@ -60,7 +60,7 @@
<table>
<tr>
<th rowspan="2">{% trans "Keys" %} ({{ db_detail|length }})</th>
- <th colspan="6">{% trans "Details" %}</th>
+ <th colspan="7">{% trans "Details" %}</th>
</tr>
<tr>
<th>{% trans "Type" %}</th>
@@ -75,6 +75,9 @@
{% for key, key_detail in db_detail.items %}
<tr>
<td>{{ key }}</td>
+ {% if key_detail.error %}
+ <td class="error" colspan="7">{% trans "ERROR:" %} {{ key_detail.error }}</td>
+ {% else %}
<td>{{ key_detail.type }}</td>
<td>{{ key_detail.ttl }}</td>
<td>{{ key_detail.details.encoding }}</td>
@@ -82,6 +85,7 @@
<td>{{ key_detail.details.lru|default:"n/a" }} (idle: {{ key_detail.details.lru_seconds_idle|default:"n/a" }})</td>
<td>{{ key_detail.details.refcount }}</td>
<td>At: {{ key_detail.details.at }}</td>
+ {% endif %}
</tr>
{% endfor %}
Please sign in to comment.
Something went wrong with that request. Please try again.