forked from rDrama/rDrama
admin_home: add git HEAD to server status.
parent
3e8712cd1d
commit
ce84861a44
|
@ -449,8 +449,8 @@ def admin_git_head():
|
|||
with open('.git/' + head_path, encoding='utf_8') as ref_f:
|
||||
gitref = ref_f.read()[0:short_len]
|
||||
except:
|
||||
return '<unable to read>'
|
||||
return gitref
|
||||
return '<unable to read>', ''
|
||||
return (gitref, head_txt)
|
||||
|
||||
@app.post("/admin/site_settings/<setting>")
|
||||
@admin_level_required(PERMS['SITE_SETTINGS'])
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
|
||||
<h4>Server Status</h4>
|
||||
<div>
|
||||
Live Revision: <code>{{gitref}}</code> <br>
|
||||
Live Revision: <code>{{gitref[0]}}</code> — <code>{{gitref[1]}}</code>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue