summaryrefslogtreecommitdiffstats
path: root/ogcp/views.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-03-26 11:51:54 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-20 18:44:15 +0200
commit411189e6ecb41b209b48993090bc5b8c8a14aa3b (patch)
tree3ac837df46bec1639545aec87adef57f5ab3cbce /ogcp/views.py
parent543b12aca8f9ab3801da9fafefbed4a04518eab4 (diff)
Add number of images to the dashboard
Users want to easily know the number of images an ogServer has.
Diffstat (limited to 'ogcp/views.py')
-rw-r--r--ogcp/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ogcp/views.py b/ogcp/views.py
index 48ff798..44e9a6e 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -117,7 +117,10 @@ def index():
clients = None
if current_user.is_authenticated:
clients = get_clients()
- return render_template('dashboard.html', clients=clients)
+ images_response = g.server.get('/images')
+ images = images_response.json()['images']
+ return render_template('dashboard.html', clients=clients,
+ images=images)
return render_template('base.html')
@app.route('/login', methods=['GET', 'POST'])