Remove background_reports feature toggle

This commit is contained in:
Maikel Linke
2024-01-30 12:11:04 +11:00
parent 865394913b
commit bcfaed852b
3 changed files with 3 additions and 12 deletions

View File

@@ -22,10 +22,7 @@ module Admin
def show
@report = report_class.new(spree_current_user, params, render: render_data?)
@background_reports = OpenFoodNetwork::FeatureToggle
.enabled?(:background_reports, spree_current_user)
if @background_reports && request.post?
if request.post?
rendering_options # stores user preferences
return background(report_format)

View File

@@ -1,9 +1,9 @@
- content_for :page_title do
= @report_title
- content_for :minimal_js, true if @background_reports
- content_for :minimal_js, true
- options = @background_reports ? { data: { remote: "true" } } : {}
- options = { data: { remote: "true" } }
= form_for @report.search, { url: url_for }.merge(options) do |f|
= hidden_field_tag "uuid", request.uuid

View File

@@ -32,9 +32,6 @@ module OpenFoodNetwork
"api_v1" => <<~DESC,
Enable the new API at <code>/api/v1</code>
DESC
"background_reports" => <<~DESC,
Generate reports in a background process to limit memory consumption.
DESC
"match_shipping_categories" => <<~DESC,
During checkout, show only shipping methods that support <em>all</em>
shipping categories. Activating this feature for an enterprise owner
@@ -54,9 +51,6 @@ module OpenFoodNetwork
# Copy features here that were activated in a migration so that new
# instances, development and test environments have the feature active.
ACTIVE_BY_DEFAULT = {
"background_reports" => <<~DESC,
Generate reports in a background process to limit memory consumption.
DESC
}.freeze
def self.setup!