sql-jarvis 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/CHANGELOG.md +228 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +775 -0
  7. data/Rakefile +1 -0
  8. data/app/assets/fonts/blazer/glyphicons-halflings-regular.eot +0 -0
  9. data/app/assets/fonts/blazer/glyphicons-halflings-regular.svg +288 -0
  10. data/app/assets/fonts/blazer/glyphicons-halflings-regular.ttf +0 -0
  11. data/app/assets/fonts/blazer/glyphicons-halflings-regular.woff +0 -0
  12. data/app/assets/fonts/blazer/glyphicons-halflings-regular.woff2 +0 -0
  13. data/app/assets/javascripts/blazer/Chart.js +14145 -0
  14. data/app/assets/javascripts/blazer/Sortable.js +1144 -0
  15. data/app/assets/javascripts/blazer/ace.js +6 -0
  16. data/app/assets/javascripts/blazer/ace/ace.js +11 -0
  17. data/app/assets/javascripts/blazer/ace/ext-language_tools.js +5 -0
  18. data/app/assets/javascripts/blazer/ace/mode-sql.js +1 -0
  19. data/app/assets/javascripts/blazer/ace/snippets/sql.js +1 -0
  20. data/app/assets/javascripts/blazer/ace/snippets/text.js +1 -0
  21. data/app/assets/javascripts/blazer/ace/theme-twilight.js +1 -0
  22. data/app/assets/javascripts/blazer/application.js +79 -0
  23. data/app/assets/javascripts/blazer/bootstrap.js +2366 -0
  24. data/app/assets/javascripts/blazer/chartkick.js +1693 -0
  25. data/app/assets/javascripts/blazer/daterangepicker.js +1505 -0
  26. data/app/assets/javascripts/blazer/fuzzysearch.js +24 -0
  27. data/app/assets/javascripts/blazer/highlight.pack.js +1 -0
  28. data/app/assets/javascripts/blazer/jquery.js +10308 -0
  29. data/app/assets/javascripts/blazer/jquery.stickytableheaders.js +263 -0
  30. data/app/assets/javascripts/blazer/jquery_ujs.js +469 -0
  31. data/app/assets/javascripts/blazer/moment-timezone.js +1007 -0
  32. data/app/assets/javascripts/blazer/moment.js +3043 -0
  33. data/app/assets/javascripts/blazer/queries.js +110 -0
  34. data/app/assets/javascripts/blazer/routes.js +23 -0
  35. data/app/assets/javascripts/blazer/selectize.js +3667 -0
  36. data/app/assets/javascripts/blazer/stupidtable.js +114 -0
  37. data/app/assets/javascripts/blazer/vue.js +7515 -0
  38. data/app/assets/stylesheets/blazer/application.css +198 -0
  39. data/app/assets/stylesheets/blazer/bootstrap.css.erb +6202 -0
  40. data/app/assets/stylesheets/blazer/daterangepicker-bs3.css +375 -0
  41. data/app/assets/stylesheets/blazer/github.css +125 -0
  42. data/app/assets/stylesheets/blazer/selectize.default.css +387 -0
  43. data/app/controllers/blazer/base_controller.rb +103 -0
  44. data/app/controllers/blazer/checks_controller.rb +56 -0
  45. data/app/controllers/blazer/dashboards_controller.rb +105 -0
  46. data/app/controllers/blazer/queries_controller.rb +325 -0
  47. data/app/helpers/blazer/base_helper.rb +57 -0
  48. data/app/mailers/blazer/check_mailer.rb +27 -0
  49. data/app/models/blazer/audit.rb +6 -0
  50. data/app/models/blazer/check.rb +95 -0
  51. data/app/models/blazer/connection.rb +5 -0
  52. data/app/models/blazer/dashboard.rb +13 -0
  53. data/app/models/blazer/dashboard_query.rb +9 -0
  54. data/app/models/blazer/query.rb +31 -0
  55. data/app/models/blazer/record.rb +5 -0
  56. data/app/views/blazer/_nav.html.erb +16 -0
  57. data/app/views/blazer/_variables.html.erb +102 -0
  58. data/app/views/blazer/check_mailer/failing_checks.html.erb +6 -0
  59. data/app/views/blazer/check_mailer/state_change.html.erb +47 -0
  60. data/app/views/blazer/checks/_form.html.erb +71 -0
  61. data/app/views/blazer/checks/edit.html.erb +1 -0
  62. data/app/views/blazer/checks/index.html.erb +40 -0
  63. data/app/views/blazer/checks/new.html.erb +1 -0
  64. data/app/views/blazer/dashboards/_form.html.erb +76 -0
  65. data/app/views/blazer/dashboards/edit.html.erb +1 -0
  66. data/app/views/blazer/dashboards/new.html.erb +1 -0
  67. data/app/views/blazer/dashboards/show.html.erb +47 -0
  68. data/app/views/blazer/queries/_form.html.erb +240 -0
  69. data/app/views/blazer/queries/edit.html.erb +2 -0
  70. data/app/views/blazer/queries/home.html.erb +152 -0
  71. data/app/views/blazer/queries/new.html.erb +2 -0
  72. data/app/views/blazer/queries/run.html.erb +163 -0
  73. data/app/views/blazer/queries/schema.html.erb +18 -0
  74. data/app/views/blazer/queries/show.html.erb +73 -0
  75. data/app/views/layouts/blazer/application.html.erb +24 -0
  76. data/blazer.gemspec +26 -0
  77. data/config/routes.rb +16 -0
  78. data/lib/blazer.rb +185 -0
  79. data/lib/blazer/adapters/athena_adapter.rb +128 -0
  80. data/lib/blazer/adapters/base_adapter.rb +53 -0
  81. data/lib/blazer/adapters/bigquery_adapter.rb +67 -0
  82. data/lib/blazer/adapters/drill_adapter.rb +28 -0
  83. data/lib/blazer/adapters/elasticsearch_adapter.rb +49 -0
  84. data/lib/blazer/adapters/mongodb_adapter.rb +39 -0
  85. data/lib/blazer/adapters/presto_adapter.rb +45 -0
  86. data/lib/blazer/adapters/sql_adapter.rb +182 -0
  87. data/lib/blazer/data_source.rb +193 -0
  88. data/lib/blazer/detect_anomalies.R +19 -0
  89. data/lib/blazer/engine.rb +47 -0
  90. data/lib/blazer/result.rb +170 -0
  91. data/lib/blazer/run_statement.rb +40 -0
  92. data/lib/blazer/run_statement_job.rb +21 -0
  93. data/lib/blazer/version.rb +3 -0
  94. data/lib/generators/blazer/install_generator.rb +39 -0
  95. data/lib/generators/blazer/templates/config.yml +62 -0
  96. data/lib/generators/blazer/templates/install.rb +45 -0
  97. data/lib/tasks/blazer.rake +10 -0
  98. metadata +211 -0
@@ -0,0 +1,375 @@
1
+ /**
2
+ * A stylesheet for use with Bootstrap 3.x
3
+ * @author: Dan Grossman http://www.dangrossman.info/
4
+ * @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved.
5
+ * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
6
+ * @website: https://www.improvely.com/
7
+ */
8
+
9
+ /* Container Appearance */
10
+
11
+ .daterangepicker {
12
+ position: absolute;
13
+ background: #fff;
14
+ top: 100px;
15
+ left: 20px;
16
+ padding: 4px;
17
+ margin-top: 1px;
18
+ border-radius: 4px;
19
+ width:278px;
20
+ }
21
+
22
+ .daterangepicker.opensleft:before {
23
+ position: absolute;
24
+ top: -7px;
25
+ right: 9px;
26
+ display: inline-block;
27
+ border-right: 7px solid transparent;
28
+ border-bottom: 7px solid #ccc;
29
+ border-left: 7px solid transparent;
30
+ border-bottom-color: rgba(0, 0, 0, 0.2);
31
+ content: '';
32
+ }
33
+
34
+ .daterangepicker.opensleft:after {
35
+ position: absolute;
36
+ top: -6px;
37
+ right: 10px;
38
+ display: inline-block;
39
+ border-right: 6px solid transparent;
40
+ border-bottom: 6px solid #fff;
41
+ border-left: 6px solid transparent;
42
+ content: '';
43
+ }
44
+
45
+ .daterangepicker.openscenter:before {
46
+ position: absolute;
47
+ top: -7px;
48
+ left: 0;
49
+ right: 0;
50
+ width: 0;
51
+ margin-left: auto;
52
+ margin-right: auto;
53
+ display: inline-block;
54
+ border-right: 7px solid transparent;
55
+ border-bottom: 7px solid #ccc;
56
+ border-left: 7px solid transparent;
57
+ border-bottom-color: rgba(0, 0, 0, 0.2);
58
+ content: '';
59
+ }
60
+
61
+ .daterangepicker.openscenter:after {
62
+ position: absolute;
63
+ top: -6px;
64
+ left: 0;
65
+ right: 0;
66
+ width: 0;
67
+ margin-left: auto;
68
+ margin-right: auto;
69
+ display: inline-block;
70
+ border-right: 6px solid transparent;
71
+ border-bottom: 6px solid #fff;
72
+ border-left: 6px solid transparent;
73
+ content: '';
74
+ }
75
+
76
+ .daterangepicker.opensright:before {
77
+ position: absolute;
78
+ top: -7px;
79
+ left: 9px;
80
+ display: inline-block;
81
+ border-right: 7px solid transparent;
82
+ border-bottom: 7px solid #ccc;
83
+ border-left: 7px solid transparent;
84
+ border-bottom-color: rgba(0, 0, 0, 0.2);
85
+ content: '';
86
+ }
87
+
88
+ .daterangepicker.opensright:after {
89
+ position: absolute;
90
+ top: -6px;
91
+ left: 10px;
92
+ display: inline-block;
93
+ border-right: 6px solid transparent;
94
+ border-bottom: 6px solid #fff;
95
+ border-left: 6px solid transparent;
96
+ content: '';
97
+ }
98
+
99
+ .daterangepicker.dropup{
100
+ margin-top: -5px;
101
+ }
102
+ .daterangepicker.dropup:before{
103
+ top: initial;
104
+ bottom:-7px;
105
+ border-bottom: initial;
106
+ border-top: 7px solid #ccc;
107
+ }
108
+ .daterangepicker.dropup:after{
109
+ top: initial;
110
+ bottom:-6px;
111
+ border-bottom: initial;
112
+ border-top: 6px solid #fff;
113
+ }
114
+
115
+ .daterangepicker.dropdown-menu {
116
+ max-width: none;
117
+ z-index: 3000;
118
+ }
119
+
120
+ .daterangepicker.single .ranges, .daterangepicker.single .calendar {
121
+ float: none;
122
+ }
123
+
124
+ .daterangepicker .calendar {
125
+ display: none;
126
+ max-width: 270px;
127
+ margin: 4px;
128
+ }
129
+
130
+ .daterangepicker.show-calendar .calendar {
131
+ display: block;
132
+ }
133
+
134
+ .daterangepicker .calendar.single .calendar-table {
135
+ border: none;
136
+ }
137
+
138
+ /* Calendars */
139
+
140
+ .daterangepicker .calendar th, .daterangepicker .calendar td {
141
+ white-space: nowrap;
142
+ text-align: center;
143
+ min-width: 32px;
144
+ }
145
+
146
+ .daterangepicker .calendar-table {
147
+ border: 1px solid #ddd;
148
+ padding: 4px;
149
+ border-radius: 4px;
150
+ background: #fff;
151
+ }
152
+
153
+ .daterangepicker table {
154
+ width: 100%;
155
+ margin: 0;
156
+ }
157
+
158
+ .daterangepicker td, .daterangepicker th {
159
+ text-align: center;
160
+ width: 20px;
161
+ height: 20px;
162
+ border-radius: 4px;
163
+ white-space: nowrap;
164
+ cursor: pointer;
165
+ }
166
+
167
+ .daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
168
+ color: #999;
169
+ background: #fff;
170
+ }
171
+
172
+ .daterangepicker td.disabled, .daterangepicker option.disabled {
173
+ color: #999;
174
+ cursor: not-allowed;
175
+ text-decoration: line-through;
176
+ }
177
+
178
+ .daterangepicker td.available:hover, .daterangepicker th.available:hover {
179
+ background: #eee;
180
+ }
181
+
182
+ .daterangepicker td.in-range {
183
+ background: #ebf4f8;
184
+ border-radius: 0;
185
+ }
186
+
187
+ .daterangepicker td.start-date {
188
+ border-radius: 4px 0 0 4px;
189
+ }
190
+
191
+ .daterangepicker td.end-date {
192
+ border-radius: 0 4px 4px 0;
193
+ }
194
+
195
+ .daterangepicker td.start-date.end-date {
196
+ border-radius: 4px;
197
+ }
198
+
199
+ .daterangepicker td.active, .daterangepicker td.active:hover {
200
+ background-color: #357ebd;
201
+ border-color: #3071a9;
202
+ color: #fff;
203
+ }
204
+
205
+ .daterangepicker td.week, .daterangepicker th.week {
206
+ font-size: 80%;
207
+ color: #ccc;
208
+ }
209
+
210
+ .daterangepicker select.monthselect, .daterangepicker select.yearselect {
211
+ font-size: 12px;
212
+ padding: 1px;
213
+ height: auto;
214
+ margin: 0;
215
+ cursor: default;
216
+ }
217
+
218
+ .daterangepicker select.monthselect {
219
+ margin-right: 2%;
220
+ width: 56%;
221
+ }
222
+
223
+ .daterangepicker select.yearselect {
224
+ width: 40%;
225
+ }
226
+
227
+ .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
228
+ width: 50px;
229
+ margin-bottom: 0;
230
+ }
231
+
232
+ .daterangepicker th.month {
233
+ width: auto;
234
+ }
235
+
236
+ /* Text Input Above Each Calendar */
237
+
238
+ .daterangepicker .input-mini {
239
+ border: 1px solid #ccc;
240
+ border-radius: 4px;
241
+ color: #555;
242
+ display: block;
243
+ height: 30px;
244
+ line-height: 30px;
245
+ vertical-align: middle;
246
+ margin: 0 0 5px 0;
247
+ padding: 0 6px 0 28px;
248
+ width: 100%;
249
+ }
250
+
251
+ .daterangepicker .input-mini.active {
252
+ border: 1px solid #357ebd;
253
+ }
254
+
255
+ .daterangepicker .daterangepicker_input i {
256
+ position: absolute;
257
+ left: 8px;
258
+ top: 8px;
259
+ }
260
+
261
+ .daterangepicker .daterangepicker_input {
262
+ position: relative;
263
+ }
264
+
265
+ /* Time Picker */
266
+
267
+ .daterangepicker .calendar-time {
268
+ text-align: center;
269
+ margin: 5px auto;
270
+ line-height: 30px;
271
+ position: relative;
272
+ padding-left: 28px;
273
+ }
274
+
275
+ .daterangepicker .calendar-time select.disabled {
276
+ color: #ccc;
277
+ cursor: not-allowed;
278
+ }
279
+
280
+ /* Predefined Ranges */
281
+
282
+ .daterangepicker .ranges {
283
+ font-size: 11px;
284
+ float: none;
285
+ margin: 4px;
286
+ text-align: left;
287
+ }
288
+
289
+ .daterangepicker .ranges ul {
290
+ list-style: none;
291
+ margin: 0 auto;
292
+ padding: 0;
293
+ width: 100%;
294
+ }
295
+
296
+ .daterangepicker .ranges li {
297
+ font-size: 13px;
298
+ background: #f5f5f5;
299
+ border: 1px solid #f5f5f5;
300
+ color: #08c;
301
+ padding: 3px 12px;
302
+ margin-bottom: 8px;
303
+ border-radius: 5px;
304
+ cursor: pointer;
305
+ }
306
+
307
+ .daterangepicker .ranges li.active, .daterangepicker .ranges li:hover {
308
+ background: #08c;
309
+ border: 1px solid #08c;
310
+ color: #fff;
311
+ }
312
+
313
+ /* Larger Screen Styling */
314
+ @media (min-width: 564px) {
315
+ .daterangepicker{
316
+ width: auto;
317
+ }
318
+
319
+ .daterangepicker .ranges ul {
320
+ width: 160px;
321
+ }
322
+ .daterangepicker.single .ranges ul {
323
+ width: 100%;
324
+ }
325
+ .daterangepicker .calendar.left .calendar-table {
326
+ border-right: none;
327
+ border-top-right-radius: 0;
328
+ border-bottom-right-radius: 0;
329
+ }
330
+
331
+ .daterangepicker .calendar.right .calendar-table {
332
+ border-left: none;
333
+ border-top-left-radius: 0;
334
+ border-bottom-left-radius: 0;
335
+ }
336
+
337
+ .daterangepicker .calendar.left {
338
+ clear: left;
339
+ margin-right: 0;
340
+ }
341
+ .daterangepicker.single .calendar.left {
342
+ clear: none;
343
+ }
344
+ .daterangepicker.single .ranges,
345
+ .daterangepicker.single .calendar{
346
+ float:left;
347
+ }
348
+
349
+ .daterangepicker .calendar.right {
350
+ margin-left: 0;
351
+ }
352
+
353
+ .daterangepicker .left .daterangepicker_input {
354
+ padding-right: 12px;
355
+ }
356
+
357
+ .daterangepicker .calendar.left .calendar-table {
358
+ padding-right: 12px;
359
+ }
360
+
361
+ .daterangepicker .ranges,
362
+ .daterangepicker .calendar {
363
+ float: left;
364
+ }
365
+ }
366
+
367
+ @media (min-width: 730px) {
368
+ .daterangepicker .ranges {
369
+ width: auto;
370
+ float: left;
371
+ }
372
+ .daterangepicker .calendar.left {
373
+ clear: none;
374
+ }
375
+ }
@@ -0,0 +1,125 @@
1
+ /*
2
+
3
+ github.com style (c) Vasily Polovnyov <vast@whiteants.net>
4
+
5
+ */
6
+
7
+ .hljs {
8
+ display: block;
9
+ color: #333;
10
+ }
11
+
12
+ .hljs-comment,
13
+ .hljs-template_comment,
14
+ .diff .hljs-header,
15
+ .hljs-javadoc {
16
+ color: #998;
17
+ font-style: italic
18
+ }
19
+
20
+ .hljs-keyword,
21
+ .css .rule .hljs-keyword,
22
+ .hljs-winutils,
23
+ .javascript .hljs-title,
24
+ .nginx .hljs-title,
25
+ .hljs-subst,
26
+ .hljs-request,
27
+ .hljs-status {
28
+ color: #333;
29
+ font-weight: bold
30
+ }
31
+
32
+ .hljs-number,
33
+ .hljs-hexcolor,
34
+ .ruby .hljs-constant {
35
+ color: #099;
36
+ }
37
+
38
+ .hljs-string,
39
+ .hljs-tag .hljs-value,
40
+ .hljs-phpdoc,
41
+ .tex .hljs-formula {
42
+ color: #d14
43
+ }
44
+
45
+ .hljs-title,
46
+ .hljs-id,
47
+ .coffeescript .hljs-params,
48
+ .scss .hljs-preprocessor {
49
+ color: #900;
50
+ font-weight: bold
51
+ }
52
+
53
+ .javascript .hljs-title,
54
+ .lisp .hljs-title,
55
+ .clojure .hljs-title,
56
+ .hljs-subst {
57
+ font-weight: normal
58
+ }
59
+
60
+ .hljs-class .hljs-title,
61
+ .haskell .hljs-type,
62
+ .vhdl .hljs-literal,
63
+ .tex .hljs-command {
64
+ color: #458;
65
+ font-weight: bold
66
+ }
67
+
68
+ .hljs-tag,
69
+ .hljs-tag .hljs-title,
70
+ .hljs-rules .hljs-property,
71
+ .django .hljs-tag .hljs-keyword {
72
+ color: #000080;
73
+ font-weight: normal
74
+ }
75
+
76
+ .hljs-attribute,
77
+ .lisp .hljs-body {
78
+ color: #008080
79
+ }
80
+
81
+ .hljs-variable,
82
+ .hljs-regexp {
83
+ color: #009926;
84
+ font-weight: bold
85
+ }
86
+
87
+ .hljs-symbol,
88
+ .ruby .hljs-symbol .hljs-string,
89
+ .lisp .hljs-keyword,
90
+ .tex .hljs-special,
91
+ .hljs-prompt {
92
+ color: #990073
93
+ }
94
+
95
+ .hljs-built_in,
96
+ .lisp .hljs-title,
97
+ .clojure .hljs-built_in {
98
+ color: #0086b3
99
+ }
100
+
101
+ .hljs-preprocessor,
102
+ .hljs-pragma,
103
+ .hljs-pi,
104
+ .hljs-doctype,
105
+ .hljs-shebang,
106
+ .hljs-cdata {
107
+ color: #999;
108
+ font-weight: bold
109
+ }
110
+
111
+ .hljs-deletion {
112
+ background: #fdd
113
+ }
114
+
115
+ .hljs-addition {
116
+ background: #dfd
117
+ }
118
+
119
+ .diff .hljs-change {
120
+ background: #0086b3
121
+ }
122
+
123
+ .hljs-chunk {
124
+ color: #aaa
125
+ }