From ce84861a44e070476d3f5bba4ae974829375912a Mon Sep 17 00:00:00 2001 From: TLSM Date: Fri, 18 Nov 2022 14:05:47 -0500 Subject: [PATCH] admin_home: add git HEAD to server status. --- files/routes/admin.py | 4 ++-- files/templates/admin/admin_home.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 2ce248bdc..3abbf0611 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -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 '' - return gitref + return '', '' + return (gitref, head_txt) @app.post("/admin/site_settings/") @admin_level_required(PERMS['SITE_SETTINGS']) diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 49b16a75c..e26cabf49 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -161,7 +161,7 @@

Server Status

- Live Revision: {{gitref}}
+ Live Revision: {{gitref[0]}}{{gitref[1]}}
{% endblock %}