1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
{% extends "base.html" %}
{% import "_partials/modals.html" as modals %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{url_for('static', filename='css/main/annotate.css')}}">
{% endblock %}
{% block app_content %}
<h1>{{ title }}</h1>
<div id="rubric" class="row">
<div class="col-md-12">
<p>{{ rubric | safe }}</p>
</div>
</div>
<div id="graph"></div>
<div id="wrap-buttons" class="row">
<div class="col-md-3 text-left">
<button class="btn btn-primary float-md-left" type="button"
id="btn-reset">Reset</button>
</div>
<div class="col-md-6 text-center">
<p id="usage">You can zoom in and pan the graph if needed.</p>
</div>
<div class="col-md-3 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("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>
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ bootstrap_find_resource('d3.v5.js', cdn='d3', use_minified=True) }}"></script>
<script src="{{ url_for('static', filename='js/updateTable.js') }}"></script>
<script src="{{ url_for('static', filename='js/buttons.js') }}"></script>
{% if is_multi %}
<script src="{{ url_for('static', filename='js/makeChartMulti.js') }}"></script>
{% else %}
<script src="{{ url_for('static', filename='js/makeChart.js') }}"></script>
{% endif %}
<script>annotateChart("#graph", {{ data.chart_data | tojson }});</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 %}
|