From 2677ed18b7066c80ffaa47a988e5789460675c16 Mon Sep 17 00:00:00 2001 From: James Turk Date: Wed, 16 May 2012 15:51:55 -0400 Subject: [PATCH] bringing back basic web interface --- oyster/templates/log_row.html | 10 +++++----- oyster/web.py | 12 +----------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/oyster/templates/log_row.html b/oyster/templates/log_row.html index 1f7fab4..c36aa9d 100644 --- a/oyster/templates/log_row.html +++ b/oyster/templates/log_row.html @@ -1,6 +1,6 @@ - - {{log.action}} - {{log.doc_id}} - {{log.url}} - {{log.timestamp.strftime("%Y-%m-%d %H:%M:%S")}} - {% if log.error %}{{log.error}}{% endif %} + + {{log.name}} + {{log.message}} + {{log.created.strftime("%Y-%m-%d %H:%M:%S")}} + {% if log.exc_info %}{{log.exc_info}}{% endif %} diff --git a/oyster/web.py b/oyster/web.py index 349e872..38da623 100644 --- a/oyster/web.py +++ b/oyster/web.py @@ -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():