coloring for errors

This commit is contained in:
James Turk 2011-08-02 18:08:01 -04:00
parent 29ac3b0fb7
commit f6072cdb9b
3 changed files with 8 additions and 6 deletions

View File

@ -13,6 +13,7 @@
table { border-spacing: 0px; margin-top: 20px; }
th { border-bottom: 2px solid black; }
a.button { padding: 0.5em 1em 0.5em 1em; border: 2px solid black; font-weight: bold; }
tbody tr.error td { background-color: #ff99a9 }
/* div.heading { border-bottom: 3px solid white; } */
</style>
</head>

View File

@ -6,8 +6,8 @@ Oyster Logs
{% block body %}
<div class="span-2 ">
{% if prev_offset %}
<div class="span-2">
{% if offset %}
<a class="button" href="/log/?offset={{prev_offset}}">&laquo; Prev</a>
{% endif %}
&nbsp;
@ -22,17 +22,17 @@ Oyster Logs
<div class="span-18">
<table>
<tr>
<th>&nbsp;&nbsp;&nbsp;</th>
<th>action</th>
<th>description</th>
<th>timestamp</th>
<th>&nbsp;</th>
</tr>
{% for log in logs %}
<tr>
<td>{% if log.error %}{{log.error}}{% endif %}</td>
<tr{% if log.error %} class="error" {% endif %}>
<td>{{log.action}}</td>
<td><a href="/tracked/{{log.url}}">{{log.url}}</td>
<td>{{log.timestamp}}</td>
<td>{% if log.error %}{{log.error}}{% endif %}</td>
</tr>
{% endfor %}
</table>

View File

@ -39,7 +39,8 @@ def log_view():
logs = client.db.logs.find().sort('$natural', -1).skip(offset).limit(size)
return flask.render_template('logs.html', logs=logs,
prev_offset=prev_offset,
next_offset=next_offset)
next_offset=next_offset,
offset=offset)
@app.route('/tracked/')