Skip to content

Commit d12d720

Browse files
committed
Merge pull request #9285 from putmanoj/show-terraform-stdout
Show Terraform Template stack stdout
2 parents 71102ea + 7a65c3e commit d12d720

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

app/helpers/application_helper/toolbar/service_center.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,14 @@ class ApplicationHelper::Toolbar::ServiceCenter < ApplicationHelper::Toolbar::Ba
8888
]
8989
),
9090
])
91+
button_group('service_refresh', [
92+
button(
93+
:service_view,
94+
'fa fa-refresh fa-lg',
95+
N_('Refresh this page'),
96+
N_('Refresh'),
97+
# needs the function because reload can't be called with different this
98+
:data => { 'function' => 'function() { window.location.reload(); }' }
99+
)
100+
])
91101
end

app/views/service/_svcs_show.html.haml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
%ul.nav.nav-tabs{'role' => 'tablist'}
44
= miq_tab_header("details") do
55
= _("Details")
6+
- if @record.type == "ServiceTerraformTemplate"
7+
- stack = @record.try(:stack, "Provision")
8+
= miq_tab_header("output") do
9+
= _("Output")
610
- if @record.type == "ServiceAnsiblePlaybook"
711
- provision_job = @record.try(:job, "Provision")
812
- retirement_job = @record.try(:job, "Retirement")
@@ -29,6 +33,12 @@
2933
= _('VMs')
3034
- if @view
3135
= render :partial => "layouts/gtl", :locals => {:view => @view, :no_flash_div => true}
36+
37+
- if @record.type == "ServiceTerraformTemplate"
38+
= miq_tab_content("output", 'default', :class => 'cm-tab') do
39+
- if stack
40+
= react('ServiceDetailStdout', { :taskid => stack.raw_stdout_via_worker(User.current_user&.userid, 'html')});
41+
3242
- if @record.type == "ServiceAnsibleTower" || @record.type == "ServiceAwx"
3343
= miq_tab_content("tower_job", 'default', :class => 'cm-tab') do
3444
= render :partial => "layouts/textual_groups_tabs", :locals => {:textual_group_list => textual_tower_job_group_list, :tab_id => "tower_job"}

0 commit comments

Comments
 (0)