sql-jarvis 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/blazer/application.css +8 -0
- data/app/assets/stylesheets/blazer/main.css +4 -0
- data/app/views/blazer/dashboards/show.html.haml +14 -13
- data/app/views/blazer/queries/_chart.html.haml +1 -1
- data/app/views/blazer/queries/_form.html.haml +30 -19
- data/app/views/layouts/blazer/application.html.haml +1 -1
- data/lib/blazer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20b85797472c4d0d85b917de1050c4d3172a4a351c321c56713c40827a658917
|
4
|
+
data.tar.gz: 50a0b34b93960e3ec2119a57e56bcc378d5a76db8df86b67db49ec2c7caebff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e999146f1fe9950dd1b6950edd1a9ab23271da7e9d04d4430aab88b9bf6330eed013dcb11ff93270c0825f0e87580f803ea50fe4cbe358194c48183b1685da8c
|
7
|
+
data.tar.gz: '077648a8ef6f0e8260a01dc8a0bdeb23c473d7e6006414acf4d253d36184da8e40d76182a4a97725eafa359ab289bf9241b7baf2b13bc76dd4a2302fb72dd8c7'
|
@@ -17,17 +17,18 @@
|
|
17
17
|
= render partial: "blazer/variables", locals: {action: dashboard_path(@dashboard)}
|
18
18
|
- else
|
19
19
|
%div{:style => "padding-bottom: 15px;"}
|
20
|
-
|
21
|
-
.
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
.dashboard
|
21
|
+
- @queries.each_with_index do |query, i|
|
22
|
+
.chart-container
|
23
|
+
%h4= link_to query.friendly_name, query_path(query, variable_params), target: "_blank"
|
24
|
+
.chart{:id => "chart-#{i}"}
|
25
|
+
%p.text-muted Loading...
|
26
|
+
:javascript
|
27
|
+
#{blazer_js_var "data", {statement: query.statement, query_id: query.id, data_source: query.data_source, only_chart: true}}
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
runQuery(data, function (data) {
|
30
|
+
$("#chart-#{i}").html(data)
|
31
|
+
$("#chart-#{i} table").stupidtable()
|
32
|
+
}, function (message) {
|
33
|
+
$("#chart-#{i}").addClass("query-error").html(message)
|
34
|
+
});
|
@@ -2,7 +2,7 @@
|
|
2
2
|
- chart_id = SecureRandom.hex
|
3
3
|
- column_types = result.column_types
|
4
4
|
- chart_type = result.chart_type
|
5
|
-
- chart_options = { id: chart_id, height: '
|
5
|
+
- chart_options = { id: chart_id, height: '40vh' }
|
6
6
|
|
7
7
|
- if ["line", "line2"].include?(chart_type)
|
8
8
|
- chart_options.merge!(min: nil)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- if @query.errors.any?
|
2
2
|
.alert.alert-danger= @query.errors.full_messages.first
|
3
3
|
#app{"v-cloak" => ""}
|
4
|
-
= form_for @query, url: (@query.persisted? ? query_path(@query, variable_params) : queries_path(variable_params)), html: {autocomplete: "off"} do |f|
|
4
|
+
= form_for @query, url: (@query.persisted? ? query_path(@query, variable_params) : queries_path(variable_params)), html: {autocomplete: "off", class: 'sql-query'} do |f|
|
5
5
|
.row
|
6
6
|
#statement-box.col-xs-8
|
7
7
|
.form-group
|
@@ -138,21 +138,23 @@
|
|
138
138
|
})
|
139
139
|
},
|
140
140
|
showIntegrationEditor: function() {
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
141
|
+
if ($('#integration-editor').length) {
|
142
|
+
integrationEditor = ace.edit("integration-editor")
|
143
|
+
integrationEditor.setTheme("ace/theme/twilight")
|
144
|
+
integrationEditor.getSession().setMode("ace/mode/ruby")
|
145
|
+
integrationEditor.setOptions({
|
146
|
+
fontSize: 12,
|
147
|
+
minLines: 10,
|
148
|
+
enableSnippets: false,
|
149
|
+
highlightActiveLine: false,
|
150
|
+
enableLiveAutocompletion: true,
|
151
|
+
enableBasicAutocompletion: true
|
152
|
+
})
|
153
|
+
integrationEditor.renderer.setShowGutter(true)
|
154
|
+
integrationEditor.renderer.setPrintMarginColumn(false)
|
155
|
+
integrationEditor.renderer.setPadding(10)
|
156
|
+
integrationEditor.getSession().setUseWrapMode(true)
|
157
|
+
}
|
156
158
|
},
|
157
159
|
showEditor: function() {
|
158
160
|
var _this = this
|
@@ -255,7 +257,8 @@
|
|
255
257
|
lines = 9
|
256
258
|
}
|
257
259
|
|
258
|
-
this.editorHeight = ((lines + 1) * 16).toString()
|
260
|
+
this.editorHeight = ((lines + 1) * 16).toString();
|
261
|
+
$('#editor').height(this.editorHeight);
|
259
262
|
|
260
263
|
Vue.nextTick(function () {
|
261
264
|
editor.resize()
|
@@ -309,8 +312,8 @@
|
|
309
312
|
dsSelectize.blur()
|
310
313
|
})
|
311
314
|
|
312
|
-
this.showEditor()
|
313
|
-
this.showIntegrationEditor()
|
315
|
+
this.showEditor();
|
316
|
+
// this.showIntegrationEditor();
|
314
317
|
}
|
315
318
|
})
|
316
319
|
|
@@ -341,3 +344,11 @@
|
|
341
344
|
return false;
|
342
345
|
}
|
343
346
|
});
|
347
|
+
|
348
|
+
(function () {
|
349
|
+
$('.sql-query').one('change', function () {
|
350
|
+
window.onbeforeunload = function () {
|
351
|
+
return 'Form protection';
|
352
|
+
};
|
353
|
+
});
|
354
|
+
})();
|
data/lib/blazer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sql-jarvis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|