bringing back basic web interface
This commit is contained in:
parent
6153bdaf2a
commit
2677ed18b7
@ -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>
|
||||
|
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user