diff --git a/frontend/app/routes.py b/frontend/app/routes.py index 882012dc7e50bd4de3283e0ccfbfdf0c52cdc13d..5f28f9ca30b36796f3dbd71dc567660f9c733a07 100644 --- a/frontend/app/routes.py +++ b/frontend/app/routes.py @@ -17,7 +17,8 @@ LOGS_PATH = "/logs" USERNAME = None PASSWORD = None -PLOTS = [['dom_activity', 'dom_rates'], 'pmt_rates_du*', ['trigger_rates'], +PLOTS = [['dom_activity', 'dom_rates', 'triggered_hits_JTRIGGER3DMUON'], + ['trigger_rates'], ['ztplot', 'triggermap']] ACOUSTICS_PLOTS = [['Online_Acoustic_Monitoring']] @@ -36,6 +37,9 @@ RASP_PLOTS = [['dom_rates', 'ztplot', 'triggermap'], 'pmt_rates_du5' ], ['trigger_rates', 'trigger_rates_lin']] +JMRA_PLOTS = [['plot_event_duration','plot_number_slices','plot_snapshot_hits'], + ['plot_number_overlays','plot_pmt_rate_distribution','plot_triggered_hits']] + if exists(CONFIG_PATH): config = toml.load(CONFIG_PATH) if "WebServer" in config: @@ -167,6 +171,11 @@ def rttc(): # "y-axis: rate [Hz], x-axis: cosine of angles. " # "blue=before, red=after") +@app.route('/jmra.html') +@requires_auth +def jmra(): + return render_template('jmra.html', plots=expand_wildcards(JMRA_PLOTS)) + @app.route('/trigger.html') @requires_auth diff --git a/frontend/app/templates/base.html b/frontend/app/templates/base.html index 1bd90ed8e9a0eabf94d23fc30963b988892fa83f..b4ea7f03bbc2bbf538b98c35b43a7d22e1dee2cb 100644 --- a/frontend/app/templates/base.html +++ b/frontend/app/templates/base.html @@ -56,6 +56,9 @@ <ul class="nav navbar-nav"> <li class="active"><a target="_blank" href="http://antorcamm2.in2p3.fr/supernova/">SN</a></li> </ul> + <ul class="nav navbar-nav"> + <li class="active"><a href="jmra.html">JMRA</a></li> + </ul> <ul class="nav navbar-nav"> <li class="active"><a href="top10.html">Top10</a></li> </ul> diff --git a/frontend/app/templates/jmra.html b/frontend/app/templates/jmra.html new file mode 100644 index 0000000000000000000000000000000000000000..5c9b6b3c6a2575d7abb887388c18fb4fba0054a5 --- /dev/null +++ b/frontend/app/templates/jmra.html @@ -0,0 +1,42 @@ +{% extends "base.html" %} + +{% block infoheader %} + {% if info is defined %} + <div class="alert alert-success alert-dismissible" role="alert">{{ info }}</div> + {% endif %} +{% endblock %} + +{% block main %} + + <div class="alert alert-success alert-dismissible" role="alert">Download the compiled PDF: <a target="_blank" href="/plots/jmra/plot_JMRA.pdf">plot_JMRA.pdf</a> [<50kB] </div> + + <div class="container-fluid" id="plots"> + {% for row in plots %} + <div class="row"> + {% for plot in row %} + <div class="col-md-{{ (12/(row|length))|int }} plot-container"> + <a href="plot_{{ plot }}.html"> + <img id="{{ plot }}" + class="plot img-responsive" + src="plots/{{ plot }}.png" + alt="{{ plot }}"/> + </a> + </div> + {% endfor %} + </div> + {% endfor %} + </div> + + <script type = "text/javascript"> + $(document).ready(function(){ + setInterval(function(){ + {% for row in plots %} + {% for plot in row %} + $("#{{ plot }}").attr("src", "plots/{{ plot }}.png?"+new Date().getTime()); + {% endfor %} + {% endfor %} + }, 45000); + }); + </script> + +{% endblock %} diff --git a/plots/jmra/.gitkeep b/plots/jmra/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391