Skip to content

Commit

Permalink
Add row_limit settings
Browse files Browse the repository at this point in the history
  • Loading branch information
aki77 committed Apr 17, 2021
1 parent a505849 commit a73173e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/blazer/queries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def render_run

respond_to do |format|
format.html do
@row_limit if Blazer.row_limit
render layout: false
end
format.csv do
Expand Down
1 change: 1 addition & 0 deletions lib/blazer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class << self
attr_accessor :override_csp
attr_accessor :slack_webhook_url
attr_accessor :mapbox_access_token
attr_accessor :row_limit
end
self.audit = true
self.user_name = :name
Expand Down
1 change: 1 addition & 0 deletions lib/blazer/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Engine < ::Rails::Engine
Blazer.from_email = Blazer.settings["from_email"] if Blazer.settings["from_email"]
Blazer.before_action = Blazer.settings["before_action_method"] if Blazer.settings["before_action_method"]
Blazer.check_schedules = Blazer.settings["check_schedules"] if Blazer.settings.key?("check_schedules")
Blazer.row_limit = Blazer.settings["row_limit"] if Blazer.settings["row_limit"]
Blazer.cache ||= Rails.cache

Blazer.anomaly_checks = Blazer.settings["anomaly_checks"] || false
Expand Down
4 changes: 4 additions & 0 deletions lib/generators/blazer/templates/config.yml.tt
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ check_schedules:
# url: <%%= ENV["BLAZER_UPLOADS_URL"] %>
# schema: uploads
# data_source: main

# limit of row count in HTML view.
# default is unlimited
# row_limit: 5000

0 comments on commit a73173e

Please sign in to comment.