blob: 8a055dfb49745885ce550bb363bc7f220589137b (
plain)
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
|
{% extends 'dashboard/dashboard_index.html' %}
{% load staticfiles %}
{% block title %}
Dashboard - Profile
{% endblock %}
{% block headerfiles %}
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js" type="text/javascript"></script>
<script type="{% static 'js/jquery-ui.js' %}"></script>
<link rel="stylesheet" type="text/css" href="{% static 'css/jquery.datetimepicker.css' %}"/>
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.js"></script>
{% endblock %}
{% block main %}
<div class = "row">
<div class = "span12">
<h2>SBHS MID: {{ mid }} <small>Profile for past {{ delta_T }} instances</small></h2>
<h3>Heat</h3>
<div id="heat" style="width:800px; height: 80px"></div>
<h3>Fan</h3>
<div id="fan" style="width:800px; height: 80px"></div>
<h3>Temperature</h3>
<div id="temp" style="width:800px; height: 80px"></div>
</div>
</div>
<script>
(function(){
var h = new Dygraph(
document.getElementById("heat"),
"{{ heat }}",
{
valueRange: [0,100]
}
);
var f = new Dygraph(
document.getElementById("fan"),
"{{ fan }}",
{
valueRange: [0,100]
}
);
var t = new Dygraph(
document.getElementById("temp"),
"{{ temp }}"
);
})();
</script>
{% endblock %}
|