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:
|
with open('.git/' + head_path, encoding='utf_8') as ref_f:
|
||||||
gitref = ref_f.read()[0:short_len]
|
gitref = ref_f.read()[0:short_len]
|
||||||
except:
|
except:
|
||||||
return '<unable to read>'
|
return '<unable to read>', ''
|
||||||
return gitref
|
return (gitref, head_txt)
|
||||||
|
|
||||||
@app.post("/admin/site_settings/<setting>")
|
@app.post("/admin/site_settings/<setting>")
|
||||||
@admin_level_required(PERMS['SITE_SETTINGS'])
|
@admin_level_required(PERMS['SITE_SETTINGS'])
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
|
|
||||||
<h4>Server Status</h4>
|
<h4>Server Status</h4>
|
||||||
<div>
|
<div>
|
||||||
Live Revision: <code>{{gitref}}</code> <br>
|
Live Revision: <code>{{gitref[0]}}</code> — <code>{{gitref[1]}}</code>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue