sql-jarvis 2.1 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6ac3baeeb351f06d68988d5f2828002dcbc4edb6c07fb841bf2c316655398f4
4
- data.tar.gz: 9d898978f1b770f769393cb2db0e6803392a15a9df23e5318a76263f77701b7f
3
+ metadata.gz: 8ccb408768cdf2c035e53db1b0362d69ec6f4e34d1ff72e984bff0da6a4041e7
4
+ data.tar.gz: 41024743b2619f5c707164e5489c32e09f641aa737d0c3e46820cb66a6fb8824
5
5
  SHA512:
6
- metadata.gz: 56535c70ff300b1d818abf4d868002b00aec750ca5b569a0774d8944892599a4335d728f8115bd6d543029cc774e4337a0d9d1272f7733ba4000b02a261d1617
7
- data.tar.gz: 5e7af8d4b27e85f9e14a2e502a6d72657499717cc981a9edec88c60732a662d84af73a8a6830eed0da5f8b938b58081163f0a2fdd8f8b3ce0a74f1ca190fe97c
6
+ metadata.gz: 1df871c679c1829144cc6449e7ae09886a75230e4c56001eaadf7fce99b52d76c6f2e2bfde33d42754d3124665f589ef6fbff2e10d76adff91c344ec67b12b1f
7
+ data.tar.gz: cdf3b703a05c4082aadfc1f6636e899837eac8deeda4784e53af8ac0ed4f2ea59a386b49d1809c5dca5446775eef10f80d9d488e37147ed74f8aea827df763c2
@@ -392,5 +392,10 @@ module Blazer
392
392
  def blazer_run_id
393
393
  params[:run_id].to_s.gsub(/[^a-z0-9\-]/i, "")
394
394
  end
395
+
396
+ def preview_rows_number
397
+ Blazer.settings['preview_rows_number'] || 365
398
+ end
399
+ helper_method :preview_rows_number
395
400
  end
396
401
  end
@@ -120,8 +120,14 @@
120
120
  ·
121
121
  \#{link_to "Forecast", query_path(@query, {forecast: "t"}.merge(variable_params))}
122
122
  %span.pull-right
123
- - if @rows.size > 0
123
+ - if (1..preview_rows_number).cover?(@rows.size)
124
124
  = link_to 'Copy to clipboard', '#results-table', class: 'click2CopyTable btn btn-xs btn-info'
125
+
126
+ - if @rows.size > preview_rows_number
127
+ %hr
128
+ %h4.text-center.text-info
129
+ %strong Notice: Now we show maximum is #{preview_rows_number} rows for preview
130
+ %hr
125
131
  .scroll-content
126
132
  %table#results-table.table.results-table
127
133
  %thead
@@ -133,7 +139,7 @@
133
139
  %div{style: "min-width: #{@min_width_types.include?(i) ? 180 : 60}px;"}
134
140
  = key
135
141
  %tbody
136
- - @rows.each do |row|
142
+ - @rows.first(preview_rows_number).each do |row|
137
143
  %tr
138
144
  - row.each_with_index do |v, i|
139
145
  - k = @columns[i]
@@ -42,6 +42,7 @@ module Blazer
42
42
  attr_accessor :before_action
43
43
  attr_accessor :from_email
44
44
  attr_accessor :host
45
+ attr_accessor :preview_rows_number
45
46
  attr_accessor :cache
46
47
  attr_accessor :transform_statement
47
48
  attr_accessor :transform_variable
@@ -58,12 +59,14 @@ module Blazer
58
59
  attr_accessor :slack_webhook_url
59
60
  attr_accessor :query_creatable
60
61
  end
62
+
61
63
  self.audit = true
62
64
  self.user_name = :name
63
65
  self.check_schedules = ["5 minutes", "1 hour", "1 day"]
64
66
  self.mapbox_access_token = nil
65
67
  self.assignees = []
66
68
  self.host = nil
69
+ self.preview_rows_number = 365
67
70
  self.anomaly_checks = false
68
71
  self.forecasting = false
69
72
  self.async = false
@@ -1,3 +1,3 @@
1
1
  module Blazer
2
- VERSION = '2.1'
2
+ VERSION = '2.1.1'
3
3
  end
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.1
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-06-03 00:00:00.000000000 Z
11
+ date: 2019-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -281,7 +281,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  - !ruby/object:Gem::Version
282
282
  version: '0'
283
283
  requirements: []
284
- rubygems_version: 3.0.3
284
+ rubyforge_project:
285
+ rubygems_version: 2.7.10
285
286
  signing_key:
286
287
  specification_version: 4
287
288
  summary: Fork from ankane! Explore your data with SQL. Easily create charts and dashboards,