Skip to content

Commit

Permalink
Merge pull request ManageIQ#523 from lgalis/pdf_download_for_job_temp…
Browse files Browse the repository at this point in the history
…late_summary

PDF download for job template summary
  • Loading branch information
Dan Clarizio authored Apr 10, 2017
2 parents 8b3cc21 + 2b3753d commit a02e86d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/controllers/automation_manager_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ def x_show
generic_x_show
end

def identify_record(id, klass = self.class.model)
type, _id = parse_nodetype_and_id(x_node)
klass = TreeBuilder.get_model_for_prefix(type).constantize if type
record = super(id, klass)
record
end

def tree_record
@record =
case x_active_tree
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def db_to_controller(db, action = "show")
action = "diagnostics_worker_selected"
when "OrchestrationStackOutput", "OrchestrationStackParameter", "OrchestrationStackResource",
"ManageIQ::Providers::CloudManager::OrchestrationStack",
"ManageIQ::Providers::AnsibleTower::AutomationManager::Job"
"ManageIQ::Providers::AnsibleTower::AutomationManager::Job", "ConfigurationScriptBase"
controller = request.parameters[:controller]
when "ContainerVolume"
controller = "persistent_volume"
Expand Down
2 changes: 2 additions & 0 deletions app/views/layouts/show_pdf.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
= render :partial => "#{controller}/main_configuration_profile"
- elsif @record.kind_of?(ManageIQ::Providers::AutomationManager::InventoryGroup)
= render :partial => "#{controller}/main_inventory_group"
- elsif @record.kind_of?(ManageIQ::Providers::AutomationManager::ConfigurationScript)
= render :partial => "#{controller}/configuration_script"
- else
= render :partial => "layouts/textual_groups_generic"
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
:automation_manager => {
:get => %w(
download_data
download_summary_pdf
explorer
form_fields
show
Expand Down

0 comments on commit a02e86d

Please sign in to comment.