summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-28 08:37:53 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-28 08:37:53 +0200
commit1356145026a8673b192bcb632f272a4aa819b5d5 (patch)
treea2cedf4fa8a0d644d02441af4a39c43baca310ba /ogcp/views.py
parent6b617bd448bf0122f2183e60f0fb4537b13caece (diff)
Add ogServer uptime to the dashboard
ogServer GET /stats returns ogServer uptime in seconds. Transform seconds to days, hours and minutes and print them in the dashboard.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 01b7a0f..d8d76c5 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -242,7 +242,8 @@ def index():
timestamp = datetime.datetime.fromtimestamp(stats.get('time').get('now'))
now = timestamp.strftime('%Y-%m-%d %H:%M:%S')
boot = display_time(stats.get('time').get('boot'))
- time_dict = {'now': now, 'boot': boot}
+ start = display_time(stats.get('time').get('start'))
+ time_dict = {'now': now, 'boot': boot, 'start': start}
return render_template('dashboard.html', clients=clients,
images=images, disk=disk, colsize="6",
oglive_list=oglive_list, stats=stats,