batsd-dash 0.3.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. data/.rbenv-version +1 -0
  2. data/Gemfile +3 -0
  3. data/README.md +36 -79
  4. data/batsd-dash.gemspec +5 -9
  5. data/lib/batsd-dash.rb +9 -80
  6. data/lib/batsd-dash/app.rb +113 -0
  7. data/lib/batsd-dash/connection.rb +54 -0
  8. data/lib/batsd-dash/graph.rb +10 -2
  9. data/lib/batsd-dash/params.rb +10 -2
  10. data/lib/{public → batsd-dash/public}/css/d3.css +199 -100
  11. data/lib/{public → batsd-dash/public}/css/datetimepicker.css +0 -0
  12. data/lib/{public → batsd-dash/public}/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  13. data/lib/{public → batsd-dash/public}/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  14. data/lib/{public → batsd-dash/public}/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  15. data/lib/{public → batsd-dash/public}/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  16. data/lib/{public → batsd-dash/public}/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  17. data/lib/{public → batsd-dash/public}/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  18. data/lib/{public → batsd-dash/public}/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  19. data/lib/{public → batsd-dash/public}/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  20. data/lib/{public → batsd-dash/public}/css/images/ui-icons_222222_256x240.png +0 -0
  21. data/lib/{public → batsd-dash/public}/css/images/ui-icons_2e83ff_256x240.png +0 -0
  22. data/lib/{public → batsd-dash/public}/css/images/ui-icons_454545_256x240.png +0 -0
  23. data/lib/{public → batsd-dash/public}/css/images/ui-icons_888888_256x240.png +0 -0
  24. data/lib/{public → batsd-dash/public}/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  25. data/lib/{public → batsd-dash/public}/css/jquery-ui.css +0 -0
  26. data/lib/batsd-dash/public/css/public.css +419 -0
  27. data/lib/batsd-dash/public/js/d3.js +4 -0
  28. data/lib/batsd-dash/public/js/dash.js +82 -0
  29. data/lib/{public → batsd-dash/public}/js/datetimepicker.js +0 -0
  30. data/lib/{public → batsd-dash/public}/js/datetimepicker.js~ +0 -0
  31. data/lib/{public → batsd-dash/public}/js/jquery-ui.js +0 -0
  32. data/lib/{public → batsd-dash/public}/js/jquery.js +0 -0
  33. data/lib/batsd-dash/public/js/nv.d3.js +5 -0
  34. data/lib/batsd-dash/version.rb +4 -2
  35. data/lib/{views → batsd-dash/views}/layout.haml +24 -6
  36. data/lib/batsd-dash/views/loading.haml +5 -0
  37. data/lib/batsd-dash/views/missing.haml +14 -0
  38. data/lib/batsd-dash/views/root.haml +37 -0
  39. data/lib/batsd-dash/views/view.haml +60 -0
  40. data/lib/sass/_charts.scss +37 -0
  41. data/lib/{batsd-dash/sass → sass}/public.scss +102 -27
  42. data/test/helper.rb +5 -16
  43. data/test/test_dash.rb +65 -69
  44. metadata +121 -101
  45. data/lib/batsd-dash/connection_pool.rb +0 -87
  46. data/lib/public/css/public.css +0 -106
  47. data/lib/public/js/d3.js +0 -4
  48. data/lib/public/js/dash.js +0 -110
  49. data/lib/public/js/flot.js +0 -6
  50. data/lib/public/js/nv.d3.js +0 -4
  51. data/lib/views/missing.haml +0 -6
  52. data/lib/views/root.haml +0 -0
  53. data/lib/views/view.haml +0 -18
  54. data/test/test_connection_pool.rb +0 -20
File without changes
@@ -0,0 +1,419 @@
1
+ /* line 17, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
2
+ html, body, div, span, applet, object, iframe,
3
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
4
+ a, abbr, acronym, address, big, cite, code,
5
+ del, dfn, em, img, ins, kbd, q, s, samp,
6
+ small, strike, strong, sub, sup, tt, var,
7
+ b, u, i, center,
8
+ dl, dt, dd, ol, ul, li,
9
+ fieldset, form, label, legend,
10
+ table, caption, tbody, tfoot, thead, tr, th, td,
11
+ article, aside, canvas, details, embed,
12
+ figure, figcaption, footer, header, hgroup,
13
+ menu, nav, output, ruby, section, summary,
14
+ time, mark, audio, video {
15
+ margin: 0;
16
+ padding: 0;
17
+ border: 0;
18
+ font: inherit;
19
+ font-size: 100%;
20
+ vertical-align: baseline;
21
+ }
22
+
23
+ /* line 22, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
24
+ html {
25
+ line-height: 1;
26
+ }
27
+
28
+ /* line 24, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
29
+ ol, ul {
30
+ list-style: none;
31
+ }
32
+
33
+ /* line 26, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
34
+ table {
35
+ border-collapse: collapse;
36
+ border-spacing: 0;
37
+ }
38
+
39
+ /* line 28, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
40
+ caption, th, td {
41
+ text-align: left;
42
+ font-weight: normal;
43
+ vertical-align: middle;
44
+ }
45
+
46
+ /* line 30, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
47
+ q, blockquote {
48
+ quotes: none;
49
+ }
50
+ /* line 103, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
51
+ q:before, q:after, blockquote:before, blockquote:after {
52
+ content: "";
53
+ content: none;
54
+ }
55
+
56
+ /* line 32, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
57
+ a img {
58
+ border: none;
59
+ }
60
+
61
+ /* line 116, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
62
+ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
63
+ display: block;
64
+ }
65
+
66
+ /* line 26, ../../../sass/public.scss */
67
+ html, body {
68
+ height: 100%;
69
+ min-height: 100%;
70
+ background-color: #222222;
71
+ }
72
+
73
+ /* line 27, ../../../sass/public.scss */
74
+ h1, h2, h3, strong, em {
75
+ color: lime;
76
+ font-family: "Courier New", Courier, monospace;
77
+ }
78
+
79
+ /* line 28, ../../../sass/public.scss */
80
+ a {
81
+ text-decoration: none;
82
+ font-family: "Courier New", Courier, monospace;
83
+ color: inherit;
84
+ }
85
+
86
+ /* line 30, ../../../sass/public.scss */
87
+ .wrap {
88
+ width: 1000px;
89
+ margin: 0 auto;
90
+ }
91
+
92
+ /* line 32, ../../../sass/public.scss */
93
+ #header {
94
+ height: 60px;
95
+ margin: 0 0 20px;
96
+ border: 1px solid lime;
97
+ border-width: 0 0 1px 0;
98
+ background-color: #000000;
99
+ *zoom: 1;
100
+ filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FF000000', endColorstr='#FF222222');
101
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(100%, #222222));
102
+ background-image: -webkit-linear-gradient(top, #000000 0%, #222222 100%);
103
+ background-image: -moz-linear-gradient(top, #000000 0%, #222222 100%);
104
+ background-image: -o-linear-gradient(top, #000000 0%, #222222 100%);
105
+ background-image: linear-gradient(top, #000000 0%, #222222 100%);
106
+ *zoom: 1;
107
+ }
108
+ /* line 38, ../../../../../../.rvm/gems/jruby-1.7.0-dev/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */
109
+ #header:after {
110
+ content: "";
111
+ display: table;
112
+ clear: both;
113
+ }
114
+ /* line 45, ../../../sass/public.scss */
115
+ #header h1 {
116
+ float: left;
117
+ font-size: 28px;
118
+ padding: 15px 0 0;
119
+ }
120
+ /* line 51, ../../../sass/public.scss */
121
+ #header ul {
122
+ float: right;
123
+ width: 300px;
124
+ margin: 15px 0;
125
+ }
126
+ /* line 56, ../../../sass/public.scss */
127
+ #header ul li {
128
+ float: left;
129
+ margin: 0 20px;
130
+ }
131
+ /* line 58, ../../../sass/public.scss */
132
+ #header ul li a {
133
+ cursor: pointer;
134
+ }
135
+
136
+ /* line 63, ../../../sass/public.scss */
137
+ #content {
138
+ position: relative;
139
+ width: 1000px;
140
+ margin: 0 auto;
141
+ font-size: 18px;
142
+ color: #eeeeee;
143
+ }
144
+ /* line 70, ../../../sass/public.scss */
145
+ #content h1 {
146
+ font-size: 26px;
147
+ margin: 30px 0;
148
+ }
149
+ /* line 71, ../../../sass/public.scss */
150
+ #content h2 {
151
+ font-size: 24px;
152
+ margin: 20px 0;
153
+ }
154
+ /* line 72, ../../../sass/public.scss */
155
+ #content h3 {
156
+ font-size: 20px;
157
+ margin: 15px 0;
158
+ }
159
+ /* line 74, ../../../sass/public.scss */
160
+ #content p {
161
+ margin: 20px 0;
162
+ text-align: center;
163
+ }
164
+ /* line 78, ../../../sass/public.scss */
165
+ #content p em {
166
+ font-style: italic;
167
+ color: lime;
168
+ }
169
+ /* line 84, ../../../sass/public.scss */
170
+ #content > strong {
171
+ margin-top: 200px;
172
+ display: block;
173
+ }
174
+ /* line 89, ../../../sass/public.scss */
175
+ #content strong, #content .nv-noData {
176
+ padding: 2px 0;
177
+ font-size: 26px;
178
+ text-align: center;
179
+ -webkit-animation-name: blink;
180
+ -webkit-animation-duration: 1s;
181
+ -webkit-animation-iteration-count: infinite;
182
+ }
183
+ /* line 99, ../../../sass/public.scss */
184
+ #content .graph {
185
+ height: 400px;
186
+ width: 880px;
187
+ margin: 0 auto;
188
+ }
189
+ /* line 104, ../../../sass/public.scss */
190
+ #content .graph strong, #content .graph .nv-noData {
191
+ height: 30px;
192
+ position: absolute;
193
+ top: 185px;
194
+ left: 290px;
195
+ }
196
+ /* line 109, ../../../sass/public.scss */
197
+ #content .inputs {
198
+ width: 900px;
199
+ margin: 0 auto 30px;
200
+ text-align: center;
201
+ }
202
+ /* line 114, ../../../sass/public.scss */
203
+ #content .inputs label {
204
+ font-weight: bold;
205
+ }
206
+ /* line 115, ../../../sass/public.scss */
207
+ #content .inputs input {
208
+ width: 200px;
209
+ }
210
+ /* line 118, ../../../sass/public.scss */
211
+ #content .list-container {
212
+ width: 500px;
213
+ float: left;
214
+ }
215
+ /* line 122, ../../../sass/public.scss */
216
+ #content .list-container h3 {
217
+ -webkit-box-sizing: border-box;
218
+ -moz-box-sizing: border-box;
219
+ box-sizing: border-box;
220
+ margin: 20px 15px;
221
+ text-align: center;
222
+ border-bottom: 1px dashed lime;
223
+ }
224
+ /* line 130, ../../../sass/public.scss */
225
+ #content .list-container ul {
226
+ list-style: circle;
227
+ padding-left: 30px;
228
+ }
229
+
230
+ /* line 137, ../../../sass/public.scss */
231
+ #loading {
232
+ -webkit-border-radius: 8px;
233
+ -moz-border-radius: 8px;
234
+ -ms-border-radius: 8px;
235
+ -o-border-radius: 8px;
236
+ border-radius: 8px;
237
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
238
+ opacity: 0;
239
+ border: 2px solid rgba(0, 255, 0, 0.25);
240
+ background: #1f1f1f;
241
+ position: absolute;
242
+ top: 50%;
243
+ left: 50%;
244
+ margin: -52px 0 0 -142px;
245
+ }
246
+ /* line 148, ../../../sass/public.scss */
247
+ #loading strong {
248
+ float: right;
249
+ font-size: 26px;
250
+ margin: 36px 10px 0;
251
+ }
252
+ /* line 154, ../../../sass/public.scss */
253
+ #loading #spinner {
254
+ position: relative;
255
+ float: left;
256
+ width: 100px;
257
+ height: 100px;
258
+ -webkit-animation-name: rotateSpinner;
259
+ -webkit-animation-duration: 2s;
260
+ -webkit-animation-iteration-count: infinite;
261
+ -webkit-animation-timing-function: linear;
262
+ }
263
+ /* line 165, ../../../sass/public.scss */
264
+ #loading #spinner div {
265
+ width: 10px;
266
+ height: 30px;
267
+ background: lime;
268
+ position: absolute;
269
+ top: 35px;
270
+ left: 45px;
271
+ }
272
+ /* line 180, ../../../sass/public.scss */
273
+ #loading #spinner .bar1 {
274
+ -webkit-transform: scale(1, 1) rotateZ(0deg) translate(0px, -40px);
275
+ -moz-transform: scale(1, 1) rotateZ(0deg) translate(0px, -40px);
276
+ -ms-transform: scale(1, 1) rotateZ(0deg) translate(0px, -40px);
277
+ -o-transform: scale(1, 1) rotateZ(0deg) translate(0px, -40px);
278
+ transform: scale(1, 1) rotateZ(0deg) translate(0px, -40px);
279
+ opacity: 0.12;
280
+ }
281
+ /* line 180, ../../../sass/public.scss */
282
+ #loading #spinner .bar2 {
283
+ -webkit-transform: scale(1, 1) rotateZ(45deg) translate(0px, -40px);
284
+ -moz-transform: scale(1, 1) rotateZ(45deg) translate(0px, -40px);
285
+ -ms-transform: scale(1, 1) rotateZ(45deg) translate(0px, -40px);
286
+ -o-transform: scale(1, 1) rotateZ(45deg) translate(0px, -40px);
287
+ transform: scale(1, 1) rotateZ(45deg) translate(0px, -40px);
288
+ opacity: 0.24;
289
+ }
290
+ /* line 180, ../../../sass/public.scss */
291
+ #loading #spinner .bar3 {
292
+ -webkit-transform: scale(1, 1) rotateZ(90deg) translate(0px, -40px);
293
+ -moz-transform: scale(1, 1) rotateZ(90deg) translate(0px, -40px);
294
+ -ms-transform: scale(1, 1) rotateZ(90deg) translate(0px, -40px);
295
+ -o-transform: scale(1, 1) rotateZ(90deg) translate(0px, -40px);
296
+ transform: scale(1, 1) rotateZ(90deg) translate(0px, -40px);
297
+ opacity: 0.37;
298
+ }
299
+ /* line 180, ../../../sass/public.scss */
300
+ #loading #spinner .bar4 {
301
+ -webkit-transform: scale(1, 1) rotateZ(135deg) translate(0px, -40px);
302
+ -moz-transform: scale(1, 1) rotateZ(135deg) translate(0px, -40px);
303
+ -ms-transform: scale(1, 1) rotateZ(135deg) translate(0px, -40px);
304
+ -o-transform: scale(1, 1) rotateZ(135deg) translate(0px, -40px);
305
+ transform: scale(1, 1) rotateZ(135deg) translate(0px, -40px);
306
+ opacity: 0.49;
307
+ }
308
+ /* line 180, ../../../sass/public.scss */
309
+ #loading #spinner .bar5 {
310
+ -webkit-transform: scale(1, 1) rotateZ(180deg) translate(0px, -40px);
311
+ -moz-transform: scale(1, 1) rotateZ(180deg) translate(0px, -40px);
312
+ -ms-transform: scale(1, 1) rotateZ(180deg) translate(0px, -40px);
313
+ -o-transform: scale(1, 1) rotateZ(180deg) translate(0px, -40px);
314
+ transform: scale(1, 1) rotateZ(180deg) translate(0px, -40px);
315
+ opacity: 0.62;
316
+ }
317
+ /* line 180, ../../../sass/public.scss */
318
+ #loading #spinner .bar6 {
319
+ -webkit-transform: scale(1, 1) rotateZ(225deg) translate(0px, -40px);
320
+ -moz-transform: scale(1, 1) rotateZ(225deg) translate(0px, -40px);
321
+ -ms-transform: scale(1, 1) rotateZ(225deg) translate(0px, -40px);
322
+ -o-transform: scale(1, 1) rotateZ(225deg) translate(0px, -40px);
323
+ transform: scale(1, 1) rotateZ(225deg) translate(0px, -40px);
324
+ opacity: 0.74;
325
+ }
326
+ /* line 180, ../../../sass/public.scss */
327
+ #loading #spinner .bar7 {
328
+ -webkit-transform: scale(1, 1) rotateZ(270deg) translate(0px, -40px);
329
+ -moz-transform: scale(1, 1) rotateZ(270deg) translate(0px, -40px);
330
+ -ms-transform: scale(1, 1) rotateZ(270deg) translate(0px, -40px);
331
+ -o-transform: scale(1, 1) rotateZ(270deg) translate(0px, -40px);
332
+ transform: scale(1, 1) rotateZ(270deg) translate(0px, -40px);
333
+ opacity: 0.87;
334
+ }
335
+ /* line 180, ../../../sass/public.scss */
336
+ #loading #spinner .bar8 {
337
+ -webkit-transform: scale(1, 1) rotateZ(315deg) translate(0px, -40px);
338
+ -moz-transform: scale(1, 1) rotateZ(315deg) translate(0px, -40px);
339
+ -ms-transform: scale(1, 1) rotateZ(315deg) translate(0px, -40px);
340
+ -o-transform: scale(1, 1) rotateZ(315deg) translate(0px, -40px);
341
+ transform: scale(1, 1) rotateZ(315deg) translate(0px, -40px);
342
+ opacity: 0.99;
343
+ }
344
+ /* line 198, ../../../sass/public.scss */
345
+ #loading.fade {
346
+ -webkit-transition: opacity 0.5s ease-in;
347
+ -moz-transition: opacity 0.5s ease-in;
348
+ -o-transition: opacity 0.5s ease-in;
349
+ }
350
+ /* line 203, ../../../sass/public.scss */
351
+ #loading.fade.in {
352
+ opacity: 1.0;
353
+ }
354
+ /* line 207, ../../../sass/public.scss */
355
+ #loading.fade.out {
356
+ opacity: 0.0;
357
+ }
358
+
359
+ @-webkit-keyframes rotateSpinner {
360
+ /* line 214, ../../../sass/public.scss */
361
+ from {
362
+ -webkit-transform: scale(0.5) rotate(0deg);
363
+ }
364
+
365
+ /* line 215, ../../../sass/public.scss */
366
+ to {
367
+ -webkit-transform: scale(0.5) rotate(360deg);
368
+ }
369
+ }
370
+
371
+ @-webkit-keyframes blink {
372
+ /* line 219, ../../../sass/public.scss */
373
+ 0% {
374
+ opacity: 1.0;
375
+ }
376
+
377
+ /* line 220, ../../../sass/public.scss */
378
+ 50% {
379
+ opacity: 0.25;
380
+ }
381
+
382
+ /* line 221, ../../../sass/public.scss */
383
+ 100% {
384
+ opacity: 1.0;
385
+ }
386
+ }
387
+
388
+ /* line 3, ../../../sass/_charts.scss */
389
+ .nvd3 .nv-series text {
390
+ fill: #eeeeee;
391
+ font-weight: bold;
392
+ }
393
+ /* line 10, ../../../sass/_charts.scss */
394
+ .nvd3 .nv-axis text {
395
+ fill: #eeeeee;
396
+ }
397
+ /* line 14, ../../../sass/_charts.scss */
398
+ .nvd3 .nv-axis line.tick, .nvd3 .nv-axis path.domain {
399
+ stroke: #eeeeee;
400
+ }
401
+ /* line 19, ../../../sass/_charts.scss */
402
+ .nvd3.nv-noData {
403
+ fill: lime;
404
+ font-size: 28px;
405
+ font-family: "Courier New", Courier, monospace;
406
+ }
407
+
408
+ /* line 27, ../../../sass/_charts.scss */
409
+ .nvtooltip {
410
+ min-width: 80px;
411
+ }
412
+ /* line 30, ../../../sass/_charts.scss */
413
+ .nvtooltip h3 {
414
+ font-weight: bold;
415
+ }
416
+ /* line 34, ../../../sass/_charts.scss */
417
+ .nvtooltip h3, .nvtooltip p {
418
+ color: #222222;
419
+ }