Skip to content

Commit

Permalink
Worflow Templates do not have job_plays and raw_stdout_via_worker
Browse files Browse the repository at this point in the history
Added a check in code to not try to show "Plays" section and load standard output for workflow template type services.

Fixes ManageIQ#4444
  • Loading branch information
h-kataria committed Aug 16, 2018
1 parent f9d9228 commit 2930b59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/helpers/service_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def textual_group_tower_job_credentials

def textual_group_tower_job_plays
return nil unless fetch_job
return nil unless @job.respond_to?(:job_plays)
fetch_job_plays
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/service/_svcs_show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
- if @record.type == "ServiceAnsibleTower"
= miq_tab_content("tower_job", 'default', :class => 'cm-tab') do
= render :partial => "layouts/textual_groups_tabs", :locals => {:textual_group_list => textual_tower_job_group_list, :tab_id => "tower_job"}
- if job
- if job && job.respond_to?(:raw_stdout_via_worker)
%ansible-raw-stdout#service_detail_ansible_tower_job{'task-id' => @record.job.raw_stdout_via_worker(nil, 'html')}
:javascript
miq_bootstrap('#service_detail_ansible_tower_job');
Expand Down

0 comments on commit 2930b59

Please sign in to comment.