-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplate.html
198 lines (155 loc) · 6.45 KB
/
template.html
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Quantophile</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<script src="js/navbar.js"></script>
</head>
<body class="container settings" style="padding-top:14px;">
<div id="mySidenav" class="sidenav">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<a href="dashboard.html"><span class="glyphicon glyphicon-leaf"></span> Dashboard</a>
<a href="strategies.html"><span class="glyphicon glyphicon-briefcase"></span> Strategies</a>
<a href="settings.html"><span class="glyphicon glyphicon-wrench"></span> Settings</a>
<a href="logout.html"><span class="glyphicon glyphicon-log-out"></span> Logout</a>
</div>
<span onclick="openNav()" class="sidebut"><<span style="color:white; font-size:30px; position:relative; left:-210px;" class=" glyphicon glyphicon-th"></span></span>
<!--Now define the graphing interface-->
<div class="container main" id="ff">
<h2>Quantophile Settings</h2>
<hr width="600" align="left">
<!-- Centered Pills -->
<ul class="nav nav-pills nav-justified" >
<li class="active"><a href="#">User Preferences</a></li>
<li style=""><a href="#">Users</a></li>
<li><a href="#">Admin Tools</a></li>
<li><a href="#">About</a></li>
</ul>
<div class="form-group" style="padding:15px">
<label for="exampleInputEmail1" style="padding-top:15px">Username</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<label for="exampleInputEmail1" style="padding-top:15px">Password</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<label for="exampleInputEmail1" style="padding-top:15px">Site Address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<button class="btn btn-success btn-block" onclick="">Save</button>
</div>
</div>
</body>
<script>
$('.main_title button').on('click', function() {
$(nn).toggleClass('clicked2');
$(gg).toggleClass('clicked');
});
$('.transl button').on('click', function() {
//UI CHANGES ON BUTTON PUSH
///////////////////////////////////////////////////////////////
// $(spinner).toggleClass('faded');
$(ff).toggleClass('clicked1');
$(gg).toggleClass('clicked2');
//CALL CALCULATION SCRIPT
///////////////////////////////////////////////////////////////
result_list = get_Degreesmax();
return result_list;
});
$('.transl1 button').on('click', function() {
// $(spinner).toggleClass('faded');
$(ff).toggleClass('clicked1');
$(gg).toggleClass('clicked2');
});
</script>
<script>
//SCRIPT TO SOLVE SYS EQNS
///////////////////////////////////////////////////////////////
function get_Degreesmax() {
//READ IN GIVEN VALUES FOR INPUT FIELDS
//////////////////////////////////////////////////////////////
var height = document.getElementById("height").value;
var weight = document.getElementById("weight").value;
var lifted_wght = document.getElementById("wght_lifted").value;
var input = new Array(height, weight, lifted_wght);
drawchart();
//SCRIPT TO LOG RESPONSE, RETURN RESULTS
///////////////////////////////////////////////////////////////
function callbackFunc(response) {
console.log(response);
return response;
}
//CALL PYTHON SCRIPT
//////////////////////////////////////////////////////////////
$.ajax({
type: "POST",
url: "/get_max_degrees.py",
data: { param: input },
success: callbackFunc
});
}
function drawchart() {
var ctx = document.getElementById("myChart").getContext('2d');
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
datasets: [{
label: 'Humeral Joint stress',
data: [12, 19, 3, 5, 2, 3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255,99,132,1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
},
options: {
legend:{
labels:{
fontColor: "white",
fontSize: 15
}
},
scales: {
yAxes: [{
ticks: {
fontColor: "white",
fontSize: 10,
stepSize: 1,
beginAtZero:true
}
}],
xAxes: [{
ticks: {
fontColor: "white",
fontSize: 10,
stepSize: 1,
beginAtZero:true
}
}]
}
}
});
};
</script>
</html>