From 79f5e92e7d6ed1e7c4f07ce478fca2c227a15899 Mon Sep 17 00:00:00 2001 From: Libor Pichler Date: Fri, 15 Mar 2019 18:58:10 +0100 Subject: [PATCH] Remove constants ALLOWED_FIELD_SUFFIXES from ReportController::Reports::Editor Those constants were moved to manageiq-core repor --- .../report_controller/reports/editor.rb | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/app/controllers/report_controller/reports/editor.rb b/app/controllers/report_controller/reports/editor.rb index a52d59e9d1a..504335e0c67 100644 --- a/app/controllers/report_controller/reports/editor.rb +++ b/app/controllers/report_controller/reports/editor.rb @@ -8,25 +8,6 @@ module ReportController::Reports::Editor DEFAULT_PDF_PAGE_SIZE = "US-Letter".freeze - CHARGEBACK_ALLOWED_FIELD_SUFFIXES = %w( - _rate - _cost - -owner_name - _metric - -provider_name - -provider_uid - -project_uid - -archived - -chargeback_rates - -vm_guid - -vm_uid - ).freeze - - METERING_VM_ALLOWED_FIELD_SUFFIXES = %w( - -beginning_of_resource_existence_in_report_interval - -end_of_resource_existence_in_report_interval - ).freeze - MAX_REPORT_COLUMNS = 100 # Default maximum number of columns in a report GRAPH_MAX_COUNT = 10 @@ -1529,7 +1510,7 @@ def build_selected_fields(rpt) f_len = fields.length for f_idx in 1..f_len # Go thru fields in reverse f_key = fields[f_len - f_idx].last - next if f_key.ends_with?(*CHARGEBACK_ALLOWED_FIELD_SUFFIXES) || f_key.include?('managed') || f_key.include?(CustomAttributeMixin::CUSTOM_ATTRIBUTES_PREFIX) + next if f_key.ends_with?(*Chargeback::ALLOWED_FIELD_SUFFIXES) || f_key.include?('managed') || f_key.include?(CustomAttributeMixin::CUSTOM_ATTRIBUTES_PREFIX) headers.delete(f_key) col_formats.delete(f_key) fields.delete_at(f_len - f_idx)