From 09624e327ca63391d40c7b9208a4a3600315ff00 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Mon, 26 Mar 2018 16:49:26 +0200
Subject: [PATCH] Load scripts in header

---
 app/routes.py | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/app/routes.py b/app/routes.py
index cfc7e55..d80418e 100644
--- a/app/routes.py
+++ b/app/routes.py
@@ -2,12 +2,22 @@ from os.path import join
 from flask import render_template, send_from_directory
 from app import app
 
-app.config['PLOTS_PATH'] = "plots"
+
+PLOTS_PATH = "plots"
+
+
+PLOTS = [
+        ['dom_activity', 'dom_rates'],
+        ['pmt_rates', 'pmt_hrv'],
+        ['trigger_rates'],
+        ]
+
 
 @app.route('/')
 def index():
-    return render_template('plots.html')
+    return render_template('plots.html', plots=PLOTS)
+
 
 @app.route('/plots/<path:filename>')
 def custom_static(filename):
-    return send_from_directory(join(app.root_path, "../plots"), filename)
+    return send_from_directory(join(app.root_path, PLOTS_PATH), filename)
-- 
GitLab