Commit c1cdff48 authored by Ryan Herbert's avatar Ryan Herbert Committed by HERBERT Ryan
Browse files

admin.py added current git revision to admin index

parent 43ff7f41
...@@ -19,11 +19,15 @@ def index(): ...@@ -19,11 +19,15 @@ def index():
p = subprocess.Popen(["df", "-h"], stdout=subprocess.PIPE) p = subprocess.Popen(["df", "-h"], stdout=subprocess.PIPE)
disk_use, err = p.communicate() disk_use, err = p.communicate()
p = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)
revision, err = p.communicate()
d = monitor() d = monitor()
return dict(d, return dict(d,
uptime=uptime, uptime=uptime,
disk_use=disk_use disk_use=disk_use,
revision=revision,
) )
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
Server status Server status
<div class="console-div"> <div class="console-div">
<div class="console-flex">{{=uptime}}</div> <div class="console-flex">{{=uptime}}</div>
<div class="console-flex">revision: {{=revision}}</div>
</div> </div>
</div> </div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment