Permalink
Browse files

bringing back basic web interface

  • Loading branch information...
1 parent 6153bda commit 2677ed18b7066c80ffaa47a988e5789460675c16 @jamesturk committed May 16, 2012
Showing with 6 additions and 16 deletions.
  1. +5 −5 oyster/templates/log_row.html
  2. +1 −11 oyster/web.py
@@ -1,6 +1,6 @@
- <tr{% if log.error %} class="error" {% endif %}>
- <td>{{log.action}}</td>
- <td>{{log.doc_id}} - {{log.url}}</td>
- <td>{{log.timestamp.strftime("%Y-%m-%d %H:%M:%S")}}</td>
- <td>{% if log.error %}{{log.error}}{% endif %}</td>
+ <tr class="{{log.levelname.lower}}">
+ <td>{{log.name}}</td>
+ <td>{{log.message}}</td>
+ <td>{{log.created.strftime("%Y-%m-%d %H:%M:%S")}}</td>
+ <td>{% if log.exc_info %}{{log.exc_info}}{% endif %}</td>
</tr>
View
@@ -51,22 +51,12 @@ def index():
status = {
'tracking': kernel.db.tracked.count(),
'need_update': kernel.get_update_queue_size(),
- 'logs': list(kernel.db.logs.find().sort('$natural', -1).limit(20)),
+ 'logs': list(kernel.db.logs.find().sort('$natural', -1).limit(100)),
'mongo_host': settings.MONGO_HOST,
}
return status
-@app.route('/status/')
-@api_wrapper()
-def doc_list():
- status = {
- 'tracking': kernel.db.tracked.count(),
- 'need_update': kernel.get_update_queue_size(),
- }
- return status
-
-
@app.route('/log/')
@api_wrapper('logs.html')
def log_view():

0 comments on commit 2677ed1

Please sign in to comment.