blob: 83dce58174364e3d1bd6a37e4cb82db5d6d76904 (
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
|
<html>
<head>
<script src="lib/jquery-1.6.2/jquery-1.6.2.min.js"></script>
</head>
<body>
<div id="log">
</div>
<script>
function log(data) {
for (var i in data) {
var sensor_name = data[i][0];
var timestamp = data[i][1];
var value = data[i][2];
var caption = "" + timestamp + ": " + sensor_name + " Value: " + value;
jQuery("div#log").append(
jQuery("<div>").text(caption));
}
}
function reload(time_stop) {
jQuery.getJSON("../stream/" + time_stop, function(resp) {
log(resp.data);
reload(resp.time_stop);
});
}
jQuery.getJSON("../stream", function(resp) {
log(resp.data);
reload(resp.time_stop);
});
</script>
</body>
</html>
|