summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Hernandez <jhernandez@soleta.eu>2024-01-03 11:29:24 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-01-03 11:39:02 +0100
commitb4856c9b279d30f8d0101efd14aca157b1535bea (patch)
treed71a1c68247c2c97451e96787d93db72b8ae39ce /ogcp/views.py
parent1497e500cb0a11689796cfb2fd4aabeb89f72b58 (diff)
templates: Make stilistic changes in dashboard
- Remove a table with redundant info; it was displaying server's stats, which was already in another table - Add last update info at the top of the page - Make page more robust by checking if ogLive images are available. Before this patch, page shows a traceback if the ogLive list are not available.
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 ba9f1a3..db56169 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -380,7 +380,8 @@ def index():
server_id = i['server'].id
dashboard_servers[server_id]['clients'] = i['json']['clients']
- return render_template('dashboard.html', servers=dashboard_servers, colsize="6")
+ now = timestamp.strftime('%Y-%m-%d %H:%M:%S')
+ return render_template('dashboard.html', servers=dashboard_servers, now=now, colsize="6")
@app.route('/login', methods=['GET', 'POST'])
def login():