aboutsummaryrefslogtreecommitdiff
path: root/app/templates/annotate/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'app/templates/annotate/index.html')
-rw-r--r--app/templates/annotate/index.html113
1 files changed, 57 insertions, 56 deletions
diff --git a/app/templates/annotate/index.html b/app/templates/annotate/index.html
index efb617b..b26410c 100644
--- a/app/templates/annotate/index.html
+++ b/app/templates/annotate/index.html
@@ -2,69 +2,70 @@
{% import "_partials/modals.html" as modals %}
{% block styles %}
-{{ super() }}
-<link rel="stylesheet" href="{{url_for('static', filename='annotate.css')}}">
+ {{ super() }}
+ <link rel="stylesheet" href="{{url_for('static', filename='annotate.css')}}">
{% endblock %}
{% block app_content %}
-<h1>{{ title }}</h1>
+ <h1>{{ title }}</h1>
-<div id="rubric" class="row">
- <div class="col-md-12">
- <p>{{ rubric | safe }}</p>
- </div>
-</div>
+ <div id="rubric" class="row">
+ <div class="col-md-12">
+ <p>{{ rubric | safe }}</p>
+ </div>
+ </div>
-<div id="graph"></div>
+ <div id="graph"></div>
-<div id="wrap-buttons" class="row">
- <div class="col-md-6 text-left">
- <button class="btn btn-primary float-md-left" type="button"
- id="btn-reset">Reset</button>
- </div>
- <div class="col-md-6 text-right">
- <button class="btn btn-warning float-md-right" type="button"
- id="btn-none">No change points</button>
- <button class="btn btn-success float-md-right" id="btn-submit"
- type="button">Submit</button>
- </div>
-</div>
-<br>
+ <div id="wrap-buttons" class="row">
+ <div class="col-md-6 text-left">
+ <button class="btn btn-primary float-md-left" type="button"
+ id="btn-reset">Reset</button>
+ </div>
+ <div class="col-md-6 text-right">
+ <button class="btn btn-warning float-md-right" type="button"
+ id="btn-none">No change points</button>
+ <button class="btn btn-success float-md-right" id="btn-submit"
+ type="button">Submit</button>
+ </div>
+ </div>
+ <br>
-{{ modals.info("submitNoCP", "No Change Points Selected", "Please use the
-\"No Change Points\" button when you think there are no change points in the
-time series.") }}
+ {{ modals.info("submitNoCP", "No Change Points Selected", "Please use the
+ \"No Change Points\" button when you think there are no change points in the
+ time series.") }}
-{{ modals.info("NoCPYesCP", "Change Points Selected", "There are selected
-change points, please click the Reset button before clicking the \"No change
-points\" button.") }}
+ {{ modals.info("NoCPYesCP", "Change Points Selected", "There are selected
+ change points, please click the Reset button before clicking the \"No change
+ points\" button.") }}
-<h3>Selected Changepoints</h3>
-<div id="changepoint-table">
- <table id="cp-table" class="table table-striped">
- </table>
-</div>
-
-{# Based on: https://github.com/benalexkeen/d3-flask-blog-post/blob/master/templates/index.html #}
-{# And: https://bl.ocks.org/mbostock/35964711079355050ff1 #}
-<script src="//d3js.org/d3.v5.min.js"></script>
-<script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
-<script src="{{ url_for('static', filename='js/updateTable.js') }}"></script>
-<script src="{{ url_for('static', filename='js/buttons.js') }}"></script>
-<script>makeChart("#graph", {{ data.chart_data | safe }});</script>
-<script>
-// reset button
-var reset = document.getElementById("btn-reset");
-reset.onclick = resetOnClick;
-// no changepoint button
-var nocp = document.getElementById("btn-none");
-nocp.onclick = function() {
- noCPOnClick({{ identifier }});
-};
-// submit button
-var submit = document.getElementById("btn-submit");
-submit.onclick = function() {
- submitOnClick({{ identifier }});
-};
-</script>
+ <h3>Selected Changepoints</h3>
+ <div id="changepoint-table">
+ <table id="cp-table" class="table table-striped">
+ </table>
+ </div>
{% endblock %}
+
+{% block scripts %}
+ {{ super() }}
+ <script src="//d3js.org/d3.v5.min.js"></script>
+ <script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
+ <script src="{{ url_for('static', filename='js/updateTable.js') }}"></script>
+ <script src="{{ url_for('static', filename='js/buttons.js') }}"></script>
+ <script>makeChart("#graph", {{ data.chart_data | safe }});</script>
+ <script>
+ // reset button
+ var reset = document.getElementById("btn-reset");
+ reset.onclick = resetOnClick;
+ // no changepoint button
+ var nocp = document.getElementById("btn-none");
+ nocp.onclick = function() {
+ noCPOnClick({{ identifier }});
+ };
+ // submit button
+ var submit = document.getElementById("btn-submit");
+ submit.onclick = function() {
+ submitOnClick({{ identifier }});
+ };
+ </script>
+{% endblock scripts %}