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 %}>
|
<tr class="{{log.levelname.lower}}">
|
||||||
<td>{{log.action}}</td>
|
<td>{{log.name}}</td>
|
||||||
<td>{{log.doc_id}} - {{log.url}}</td>
|
<td>{{log.message}}</td>
|
||||||
<td>{{log.timestamp.strftime("%Y-%m-%d %H:%M:%S")}}</td>
|
<td>{{log.created.strftime("%Y-%m-%d %H:%M:%S")}}</td>
|
||||||
<td>{% if log.error %}{{log.error}}{% endif %}</td>
|
<td>{% if log.exc_info %}{{log.exc_info}}{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -51,22 +51,12 @@ def index():
|
|||||||
status = {
|
status = {
|
||||||
'tracking': kernel.db.tracked.count(),
|
'tracking': kernel.db.tracked.count(),
|
||||||
'need_update': kernel.get_update_queue_size(),
|
'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,
|
'mongo_host': settings.MONGO_HOST,
|
||||||
}
|
}
|
||||||
return status
|
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/')
|
@app.route('/log/')
|
||||||
@api_wrapper('logs.html')
|
@api_wrapper('logs.html')
|
||||||
def log_view():
|
def log_view():
|
||||||
|
Loading…
Reference in New Issue
Block a user