-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
89 lines (78 loc) · 3.3 KB
/
index.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
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="./js/randomColor/randomColor.js"></script>
<script src="./js/datetimepicker/jquery.datetimepicker.js"></script>
<script src="./js/chartjs/chart.js"></script>
<script src="./js/cookiejs/cookie.js" type="text/javascript"></script>
<script src="./js/oAuth2utils.js" type="text/javascript"></script>
<script src="./js/gfitRest.js" type="text/javascript"></script>
<script src="./js/utilities.js" type="text/javascript"></script>
<script src="./js/stats.js" type="text/javascript"></script>
<script src="./js/core.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="./css/jquery.datetimepicker.css" />
<link rel="stylesheet" type="text/css" href="./css/styles.css" />
</head>
<body>
GOOGLE_AUTH_CODE: <input id="inp-google-auth-code" style="width: 500px;">
<br/> ACCESS_TOKEN: <input id="inp-access_token" style="width: 500px;"> <input type="button" value="RESET" onclick="resetAccessToken()">
<br/> REFRESH_TOKEN: <input id="inp-refresh-token" style="width: 500px;">
<br/> These value are stored into browser cookies. Reset these cookies <input type="button" value="Reset" onclick="resetCookies()">
<hr>
<div id="not-logged">
You are not logged. Please <input type="button" onclick="requestGoogleAuthToken()" value="login">
</div>
<div id="logged-in">
Logged in!
<br /> Data type:
<select id="select-datatype">
<option value="calories">Calories</option>
<option value="steps">Steps</option>
<option value="distance">Distance</option>
<option value="activities">Activities</option>
</select> Start Date: <input id="startDatePicker"> End Date: <input id="endDatePicker"> Bucket by:
<select id="select-bucketby">
<option value="hour">Hour</option>
<option value="day">Day</option>
<option value="week">Week</option>
<option value="month">Month</option>
</select>
<input type="button" value="Request" id="btn-request" onclick="btnRequestClick()">
<br>
<br>
<div id="request-result"></div>
<div id="stats">
<hr>
<canvas id="chart-calories" width="400" height="250" style="display: inline-block;"></canvas>
<canvas id="chart-distance" width="400" height="250" style="display: inline-block;"></canvas>
<canvas id="chart-steps" width="400" height="250" style="display: inline-block;"></canvas>
<br>
<canvas id="chart-activities" width="1200" height="400" style="display: inline-block;"></canvas>
<canvas id="chart-month-pie" width="400" height="400" style="display: inline-block;"></canvas>
<br><br>
<input id="stats-calendar" type="text">
<table id="stats-calendar-day">
<tr class="day-header">
<td>Date</td>
<td></td>
</tr>
<tr class="day-steps">
<td>Steps</td>
<td></td>
</tr>
<tr class="day-cals">
<td>Calories</td>
<td></td>
</tr>
<tr class="day-distance">
<td>Distance</td>
<td></td>
</tr>
<tr class="day-activities">
<td colspan="2"><b>Sport Activities</b></td>
</tr>
</table>
</div>
</div>
</body>
</html>