mirror of
https://github.com/samsonjs/watch-yourself.git
synced 2026-03-25 09:25:50 +00:00
before google docs
This commit is contained in:
parent
a0b9bab130
commit
bd5156caf7
2 changed files with 20 additions and 1 deletions
19
public/out.html
Normal file
19
public/out.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<meta charset="utf-8">
|
||||
<meta name=viewport content="width=device-width, initial-scale=1">
|
||||
|
||||
<style>
|
||||
body { font-family: 'helvetica neue', helvetica, sans-serif }
|
||||
</style>
|
||||
|
||||
<title>watch yourself</title>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$.get('/stats', function(stats, textStatus) {
|
||||
alert(textStatus + '\n' + stats)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
|
|
@ -35,7 +35,7 @@ module WatchYourself
|
|||
stats = { :time => now, :sys => params['sys'], :dia => params['dia'], :pulse => params['pulse'] }
|
||||
$stderr.puts "[#{now}] IN: #{stats.inspect}"
|
||||
redis.zadd key('stats'), now, JSON.stringify(stats)
|
||||
redirect '/stats.html'
|
||||
redirect '/out.html'
|
||||
end
|
||||
|
||||
get '/stats' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue