forked from xively/channel-viz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
383 lines (365 loc) · 14.1 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
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
<!--
Visualising Xively Feeds with D3
Prepared by Paul Cheek
(c) 2013 LogMeIn, Inc.
-->
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>WebMOS Visualization</title>
<link type="text/css" rel="stylesheet" href="css/normalize.css" />
<link type="text/css" rel="stylesheet" href="css/foundation.min.css" />
<link type="text/css" rel="stylesheet" href="css/rickshaw.min.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" type="text/css" media="all" />
<style type="text/css">
body, html {
max-width: 100%;
min-height: 100%;
overflow-x: hidden;
background: #666 url(img/loading.gif) center center no-repeat;
}
.hidden {
display: none;
}
#xivelyContent {
background: #fff;
box-shadow: inset 0px 0px 100px #f0f0f0;
}
.graphWrapper {
-moz-box-shadow:inset 0px 0px 50px 25px #ffffff;
-webkit-box-shadow:inset 0px 0px 50px 25px #ffffff;
box-shadow:inset 0px 0px 50px 25px #ffffff;
background-image: linear-gradient(bottom, rgb(255,255,255) 30%, rgb(245,245,245) 97%);
background-image: -o-linear-gradient(bottom, rgb(255,255,255) 30%, rgb(245,245,245) 97%);
background-image: -moz-linear-gradient(bottom, rgb(255,255,255) 30%, rgb(245,245,245) 97%);
background-image: -webkit-linear-gradient(bottom, rgb(255,255,255) 30%, rgb(245,245,245) 97%);
background-image: -ms-linear-gradient(bottom, rgb(255,255,255) 30%, rgb(245,245,245) 97%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.3, rgb(255,255,255)),
color-stop(0.97, rgb(245,245,245))
);
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="js/custom.modernizr.js"></script>
<script src="js/xivelyjs-1.0.0.min.js"></script>
<script src="js/d3.v2.js"></script>
<script src="js/rickshaw.min.js"></script>
</head>
<body>
<!-- Header -->
<div style="background: #101C24;">
<div class="row">
<div class="large-12 columns">
<h1 style="color: #FFF; text-shadow: 0px 1px 0px #000;">
Visualizing Xively Feeds
</h1>
</div>
</div>
</div>
<!-- Form -->
<div id="form" style="background: #F0F0F0; border-bottom: 1px solid #CCC; padding: 25px; padding-bottom: 15px;">
<div class="row">
<div class="large-5 columns">
<div class="row collapse">
<div class="small-3 columns">
<span class="prefix">API Key</span>
</div>
<div class="small-9 columns">
<input type="text" placeholder="Valid Master API Key" id="apiKeyInput">
</div>
</div>
</div>
<div class="large-5 columns">
<div class="row collapse">
<div class="small-3 columns">
<span class="prefix">Feed ID's</span>
</div>
<div class="small-9 columns">
<input type="text" placeholder="Comma separated" id="feedsInput">
</div>
</div>
</div>
<div class="large-2 columns">
<a id="setFeeds" href="#" data-reveal-id="secondModal" class="secondary button small expand">
Visualize »
</a>
</div>
</div>
</div>
<!-- Page Content -->
<div id="xivelyContent" style="position: relative;">
<a href="https://github.com/xively/channel-viz" class="hide-for-medium hide-for-small"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a>
<div id="welcome">
<div class="row">
<div class="large-1 columns"> </div>
<div class="large-10 columns text-center">
<br/><br/><br/><br/><br/><br/><br/>
<h1 class="subheader" style="text-align: center;">Welcome to Xively!</h1>
<p>This page is an example of just one of many ways you can visualise your data on Xively.<br/>It was created with open-source tools, and reads data from Xively with the Xively JavaScript library.</p>
<p>Read the tutorial <i>(comming soon)</i> on how to make and customise your own.</p>
</div>
<div class="large-1 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns">
<br/><br/><br/><br/><hr/><br/><br/><br/><br/>
<div class="row">
<div class="large-4 columns">
<div class="hero panel">
<p style="font-size: 14px;">To use this page, enter a Master API Key from your Xively account, and a list of the Feeds that you would like to display, into the forms above. You can view multiple Feeds by separating them with a comma, and select individual channels with an exclamation mark.</p>
</div>
</div>
<div class="large-8 columns">
<h4 class="subheader">Examples</h4>
<hr/>
<div class="row">
<div class="large-4 columns">
<strong style="text-transform: uppercase;">Multiple Feeds</strong>
</div>
<div class="large-8 columns">
<pre><em>61916,61916</em></pre>
</div>
</div>
<hr/>
<div class="row">
<div class="large-4 columns">
<strong style="text-transform: uppercase;">Individual Channels</strong><br/>
<small>separate with exclamation marks</small>
</div>
<div class="large-8 columns">
<pre><em>61916!random5!random3600</em></pre><br/>
<pre><em>61916!random5,61916!random3600</em></pre>
</div>
</div>
</div>
</div>
<br/><br/><br/><br/><hr/><br/><br/><br/><br/>
</div>
</div>
<div class="row">
<div class="large-2 columns"> </div>
<div class="large-8 columns">
<h5 class="subheader text-center">To begin visualizing data, enter your Xively Master API key above!</h5>
<br/><br/><br/><br/><br/><br/><br/>
</div>
<div class="large-2 columns"> </div>
</div>
</div>
<div id="invalidApiKey" class="hidden">
<div class="row">
<div class="large-2 columns"> </div>
<div class="large-8 columns">
<br/><br/><br/>
<h1 class="subheader" style="text-align: center;">Uh oh!</h1>
<h2 class="subheader" style="text-align: center;">Your API key is invalid!</h2>
<p>Please try again or generate a new key on Xively. It is important to keep in mind that this API key must be a global API key in order to work in this example. Using an application-specific API key will cause this example to malfunction.</p>
<a href="#" data-reveal-id="exampleModal" class="openStart radius secondary button expand">Ready When You Are...</a>
<br/><br/><br/>
</div>
<div class="large-2 columns"> </div>
</div>
</div>
<div id="validApiKey" class="hidden">
<div class="row">
<div class="large-2 columns"> </div>
<div class="large-8 columns">
<br/><br/><br/>
<br/><br/><br/>
<h1 class="subheader" style="text-align: center;">Connected to Xively!</h1>
<h5 class="subheader text-center">To begin visualizing data, enter your Xively feed information above...</h5>
</div>
<div class="large-2 columns"> </div>
</div>
<div class="row">
<div class="large-12 columns">
<br/><br/><br/><br/><hr/><br/><br/><br/><br/>
<div class="row">
<div class="large-4 columns">
<div class="hero panel">
<p style="font-size: 14px;">To use this page, enter a Master API Key from your Xively account, and a list of the Feeds that you would like to display, into the forms above. You can view multiple Feeds by separating them with a comma, and select individual channels with an exclamation mark.</p>
</div>
</div>
<div class="large-8 columns">
<h4 class="subheader">Examples</h4>
<hr/>
<div class="row">
<div class="large-4 columns">
<strong style="text-transform: uppercase;">Multiple Feeds</strong>
</div>
<div class="large-8 columns">
<pre><em>61916,61916</em></pre>
</div>
</div>
<hr/>
<div class="row">
<div class="large-4 columns">
<strong style="text-transform: uppercase;">Individual Channels</strong><br/>
<small>separate with exclamation marks</small>
</div>
<div class="large-8 columns">
<pre><em>61916!random5!random3600</em></pre><br/>
<pre><em>61916!random5,61916!random3600</em></pre>
</div>
</div>
</div>
</div>
<br/><br/><br/><br/>
<br/><br/><br/><br/>
<br/><br/><br/><br/>
</div>
</div>
</div>
<div id="feeds">
<div class="feed hidden" id="exampleFeedNotFound" style="line-height: 25px; padding-top: 25px;">
<div class="row title">
<div class="large-12 columns">
<h2 class="subheader value">Loading Feed Data...</h2>
<div class="alert alert-box no-info">
Sorry, this feed could not be found.
</div>
</div>
</div>
</div>
<div class="feed hidden" id="exampleFeed" style="line-height: 25px; padding-top: 25px;">
<div class="row title">
<div class="large-12 columns">
<h2 class="subheader value">Loading Feed Data...</h2>
</div>
</div>
<div class="row">
<div class="large-7 columns">
<h4 class="subheader">Meta</h4>
<div class="row id">
<div class="large-4 columns"><strong>ID</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row description">
<div class="large-4 columns"><strong>Description</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row link">
<div class="large-4 columns"><strong>Link</strong></div>
<div class="large-8 columns value"><a href="#">View on Xively »</a></div>
</div>
<div class="row creator">
<div class="large-4 columns"><strong>Creator</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row updated">
<div class="large-4 columns"><strong>Updated</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row tags">
<div class="large-4 columns"><strong>Tags</strong></div>
<div class="large-8 columns value"></div>
</div>
</div>
<div class="large-5 columns">
<h4 class="subheader">Location</h4>
<div class="alert alert-box hidden no-location">
Sorry, no location information is available.
</div>
<div class="row location-name">
<div class="large-4 columns"><strong>Name</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row latitude">
<div class="large-4 columns"><strong>Latitude</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row longitude">
<div class="large-4 columns"><strong>Longitude</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row elevation">
<div class="large-4 columns"><strong>Elevation</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row disposition">
<div class="large-4 columns"><strong>Disposition</strong></div>
<div class="large-8 columns value"></div>
</div>
<div class="row map">
<div class="large-4 columns"><strong>Map</strong></div>
<div class="large-8 columns value"><a href="#">View on Google Maps »</a></div>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<div class="button-group" style="float: right;">
<a href="#" class="small button secondary duration-hour">6 Hrs</a>
<a href="#" class="small button secondary duration-day">Day</a>
<a href="#" class="small button secondary duration-week">Week</a>
<a href="#" class="small button secondary duration-month">Month</a>
<a href="#" class="small button secondary duration-90">90 Days</a>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<div class="datastreams" style="padding-bottom: 15px;">
<div class="datastream hidden">
<hr/>
<div class="row">
<div class="large-9 columns datastream-name subheader" style="font-size: 24px;">
Datastream Name
</div>
<div class="large-3 columns datastream-value subheader" style="font-size: 24px; text-align: right;">
420
</div>
</div>
<div class="row">
<div class="large-12 columns">
<div class="graphWrapper" style="margin-top: 15px; padding: 10px; text-align: center;">
<div class="graph" style="width: 600px; margin: auto;"></div>
</div>
<div class="slider" style="width: 600px; height: 15px; margin: auto;"></div>
</div>
</div>
</div>
</div>
</div>
<hr/>
</div>
</div>
</div>
</div>
<!-- Footer -->
<div style="background: #0D1B23;">
<div style="padding: 15px;">
<div class="row">
<div class="large-8 columns" style="color: rgb(81, 98, 111); padding-top: 10px; padding-bottom: 10px;">
<small>
This page was created with open-source tools, and uses data from <a style="font-weight: bold; color: rgb(81, 98, 111);" href="https://xively.com">Xively</a>. Read the <a style="font-weight: bold; color: rgb(81, 98, 111);" href="#">Tutorial (coming soon)</a> on how to make your own.
</small>
</div>
<div class="large-4 columns" style="color: rgb(81, 98, 111); padding-top: 10px; padding-bottom: 10px;">
<small>
<a style="color: rgb(81, 98, 111);" href="https://github.com/xively/channel-viz/blob/master/LICENSE.md">This library is Open Source, under the BSD 3-Clause license.</a>
</small>
</div>
</div>
</div>
</div>
<!-- Modals -->
<div id="loadingData" class="reveal-modal small text-center">
<br/><br/><h2 class="subheader">Loading...</h2><br/><br/>
</div>
<script>
document.write('<script src=' +
('__proto__' in {} ? 'js/zepto' : 'js/jquery') +
'.js><\/script>')
</script>
<script src="js/foundation.min.js"></script>
<script src="follows.js"></script>
</body>
</html>