Module: Katello::SubscriptionMailerHelper
- Includes:
- ActionView::Helpers::UrlHelper
- Included in:
- SubscriptionMailer
- Defined in:
- app/helpers/katello/subscription_mailer_helper.rb
Instance Method Summary collapse
Instance Method Details
#report_link ⇒ Object
11 12 13 |
# File 'app/helpers/katello/subscription_mailer_helper.rb', line 11 def report_link link_to _("View a report of the affected hosts"), report_url end |
#report_url ⇒ Object
6 7 8 9 |
# File 'app/helpers/katello/subscription_mailer_helper.rb', line 6 def report_url base_url = report_data_report_template_path(@report_template.id, job_id: @provider_job_id) "#{Setting[:foreman_url]}#{base_url}" end |
#start_report_task(days_from_now) ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/helpers/katello/subscription_mailer_helper.rb', line 15 def start_report_task(days_from_now) @report_template = ReportTemplate.find_by(name: "Subscription - Entitlement Report") template_input_id = @report_template.template_inputs.find_by_name("Days from Now").id.to_s params = { format: 'csv', template_id: @report_template.id, input_values: { template_input_id => { value: days_from_now} } } composer = ReportComposer.new(params) @provider_job_id = composer.schedule_rendering.provider_job_id end |