Permalink
Browse files

Handle key errors in template.

  • Loading branch information...
1 parent 6e2c912 commit f50394bc3ebcebeddc9f7a1af56b2ce66ae31cfd @ionelmc committed Nov 5, 2011
Showing with 9 additions and 1 deletion.
  1. +4 −0 src/redisboard/static/redisboard/admin.css
  2. +5 −1 src/redisboard/templates/redisboard/inspect.html
View
4 src/redisboard/static/redisboard/admin.css
@@ -20,3 +20,7 @@
.details td {
width: 50%;
}
+td.error {
+ font-weight: bold;
+ color: #B22222;
+}
View
6 src/redisboard/templates/redisboard/inspect.html
@@ -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,13 +75,17 @@
{% 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>
<td>{{ key_detail.details.serializedlength }}</td>
<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 %}

0 comments on commit f50394b

Please sign in to comment.