Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
@@ -20,3 +20,7 @@
20 20 .details td {
21 21 width: 50%;
22 22 }
  23 +td.error {
  24 + font-weight: bold;
  25 + color: #B22222;
  26 +}
6 src/redisboard/templates/redisboard/inspect.html
@@ -60,7 +60,7 @@
60 60 <table>
61 61 <tr>
62 62 <th rowspan="2">{% trans "Keys" %} ({{ db_detail|length }})</th>
63   - <th colspan="6">{% trans "Details" %}</th>
  63 + <th colspan="7">{% trans "Details" %}</th>
64 64 </tr>
65 65 <tr>
66 66 <th>{% trans "Type" %}</th>
@@ -75,6 +75,9 @@
75 75 {% for key, key_detail in db_detail.items %}
76 76 <tr>
77 77 <td>{{ key }}</td>
  78 + {% if key_detail.error %}
  79 + <td class="error" colspan="7">{% trans "ERROR:" %} {{ key_detail.error }}</td>
  80 + {% else %}
78 81 <td>{{ key_detail.type }}</td>
79 82 <td>{{ key_detail.ttl }}</td>
80 83 <td>{{ key_detail.details.encoding }}</td>
@@ -82,6 +85,7 @@
82 85 <td>{{ key_detail.details.lru|default:"n/a" }} (idle: {{ key_detail.details.lru_seconds_idle|default:"n/a" }})</td>
83 86 <td>{{ key_detail.details.refcount }}</td>
84 87 <td>At: {{ key_detail.details.at }}</td>
  88 + {% endif %}
85 89 </tr>
86 90 {% endfor %}
87 91

0 comments on commit f50394b

Please sign in to comment.
Something went wrong with that request. Please try again.