Skip to content

Commit

Permalink
Merge pull request #9285 from putmanoj/show-terraform-stdout
Browse files Browse the repository at this point in the history
Show Terraform Template stack stdout
  • Loading branch information
agrare committed Oct 21, 2024
2 parents 71102ea + 7a65c3e commit d12d720
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/helpers/application_helper/toolbar/service_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,14 @@ class ApplicationHelper::Toolbar::ServiceCenter < ApplicationHelper::Toolbar::Ba
]
),
])
button_group('service_refresh', [
button(
:service_view,
'fa fa-refresh fa-lg',
N_('Refresh this page'),
N_('Refresh'),
# needs the function because reload can't be called with different this
:data => { 'function' => 'function() { window.location.reload(); }' }
)
])
end
10 changes: 10 additions & 0 deletions app/views/service/_svcs_show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
%ul.nav.nav-tabs{'role' => 'tablist'}
= miq_tab_header("details") do
= _("Details")
- if @record.type == "ServiceTerraformTemplate"
- stack = @record.try(:stack, "Provision")
= miq_tab_header("output") do
= _("Output")
- if @record.type == "ServiceAnsiblePlaybook"
- provision_job = @record.try(:job, "Provision")
- retirement_job = @record.try(:job, "Retirement")
Expand All @@ -29,6 +33,12 @@
= _('VMs')
- if @view
= render :partial => "layouts/gtl", :locals => {:view => @view, :no_flash_div => true}

- if @record.type == "ServiceTerraformTemplate"
= miq_tab_content("output", 'default', :class => 'cm-tab') do
- if stack
= react('ServiceDetailStdout', { :taskid => stack.raw_stdout_via_worker(User.current_user&.userid, 'html')});

- if @record.type == "ServiceAnsibleTower" || @record.type == "ServiceAwx"
= 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"}
Expand Down

0 comments on commit d12d720

Please sign in to comment.