datascope 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/datascope.gemspec +1 -1
- data/javascripts/client.coffee +2 -2
- data/lib/datascope.rb +7 -0
- data/views/index.haml +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 281438ec6bf435cf98848920f227afb12fdb1c33
|
4
|
+
data.tar.gz: cbbd126b40f5a5369c57408d4a748e615174ae52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 351980c6f70437a437230e56b3031c5ea76b02a70f25a0041adcdffcf9cbed9ce426758968032235c2815b6f13da3a1823ec13fe4a5fddebf660f2d26751f861
|
7
|
+
data.tar.gz: 16a1cfbc889058ea96054da02c36a378ccc692708f3b2de774a59dd6a967963435ddd822c0c75a9f0d85e629af9dc931da2be4e25b47e7c07317d1c92443d007
|
data/datascope.gemspec
CHANGED
data/javascripts/client.coffee
CHANGED
@@ -4,7 +4,7 @@ context = cubism.context()
|
|
4
4
|
|
5
5
|
getThing = (name, selector) ->
|
6
6
|
context.metric( (start,stop,step,callback)->
|
7
|
-
url = "
|
7
|
+
url = "metric?selector=#{selector}&start=#{start.toISOString()}&stop=#{stop.toISOString()}&step=#{step}"
|
8
8
|
d3.json url, (data) ->
|
9
9
|
return callback(new Error('could not load data')) unless data
|
10
10
|
callback(null, data)
|
@@ -13,7 +13,7 @@ getThing = (name, selector) ->
|
|
13
13
|
|
14
14
|
|
15
15
|
|
16
|
-
$.getJSON('
|
16
|
+
$.getJSON('queries', (data) ->
|
17
17
|
console.log(data)
|
18
18
|
$ -> _.each(data, (it) -> $('#queries').append("<li><em>#{it.calls}c, #{it.total_time}ms</em> #{it.query}</li>"))
|
19
19
|
)
|
data/lib/datascope.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'sinatra/base'
|
2
|
+
require 'rack/coffee'
|
2
3
|
require 'sequel'
|
3
4
|
require 'json'
|
4
5
|
require 'haml'
|
@@ -12,6 +13,12 @@ class Datascope < Sinatra::Base
|
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
16
|
+
set :root, File.expand_path(File.dirname(__FILE__) + "/../")
|
17
|
+
set :public_folder, Proc.new { "#{root}/public" }
|
18
|
+
set :views, Proc.new { "#{root}/views" }
|
19
|
+
|
20
|
+
use Rack::Coffee, :root => root
|
21
|
+
|
15
22
|
get '/' do
|
16
23
|
haml :index
|
17
24
|
end
|
data/views/index.haml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
!!!
|
2
2
|
|
3
|
-
%link{rel: 'stylesheet', href: '
|
3
|
+
%link{rel: 'stylesheet', href: 'css/style.css'}
|
4
4
|
%script{src: '//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js'}
|
5
|
-
%script{src: '
|
6
|
-
%script{src: '
|
7
|
-
%script{src: '
|
5
|
+
%script{src: 'javascripts/underscore-min.js'}
|
6
|
+
%script{src: 'javascripts/d3.v2.js'}
|
7
|
+
%script{src: 'javascripts/cubism.v1.js'}
|
8
8
|
|
9
9
|
%body
|
10
|
-
%script{src: '
|
10
|
+
%script{src: 'javascripts/client.js'}
|
11
11
|
|
12
12
|
%h1 datascope
|
13
13
|
#cubism
|