From 7ff2e8899fda7136853ce0093ef1517bfb2c9033 Mon Sep 17 00:00:00 2001 From: Jens Kreiensiek Date: Wed, 19 Jun 2019 14:25:09 +0200 Subject: [PATCH] Show uptime in system status page --- management/daemon.py | 5 +++++ management/templates/system-status.html | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/management/daemon.py b/management/daemon.py index 572b6b4a..3ab6f4c0 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -442,6 +442,11 @@ def system_status(): pool.terminate() return json_response(output.items) +@app.route('/system/uptime') +@authorized_personnel_only +def show_uptime(): + return utils.shell("check_output", ["/usr/bin/uptime", "--pretty"]) + @app.route('/system/updates') @authorized_personnel_only def show_updates(): diff --git a/management/templates/system-status.html b/management/templates/system-status.html index dc9233a5..aa11c67b 100644 --- a/management/templates/system-status.html +++ b/management/templates/system-status.html @@ -39,6 +39,9 @@
+ +