Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add row_limit settings #311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 ||= Blazer.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