From e2257c399ef05900d28d0ca4dad4fe5b4ff205e2 Mon Sep 17 00:00:00 2001 From: Milan Zazrivec Date: Wed, 26 Apr 2017 09:00:59 +0200 Subject: [PATCH] Show VMware credential in service provisioning summary https://bugzilla.redhat.com/show_bug.cgi?id=1444092 --- app/helpers/service_helper/textual_summary.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/helpers/service_helper/textual_summary.rb b/app/helpers/service_helper/textual_summary.rb index 6487c779546..c50ed8480b2 100644 --- a/app/helpers/service_helper/textual_summary.rb +++ b/app/helpers/service_helper/textual_summary.rb @@ -22,7 +22,7 @@ def textual_group_provisioning_details def textual_group_provisioning_credentials return nil unless provisioning_get_job - TextualGroup.new(_("Credentials"), %i(machine_credential network_credential cloud_credential)) + TextualGroup.new(_("Credentials"), %i(machine_credential network_credential cloud_credential vmware_credential)) end def textual_group_provisioning_plays @@ -234,6 +234,15 @@ def textual_cloud_credential credential(credential, _("Cloud")) end + def textual_vmware_credential + credential = @job.authentications.find_by(:type => 'ManageIQ::Providers::EmbeddedAnsible::AutomationManager::VmwareCredential') + return nil unless credential + {:label => _('VMware'), + :value => credential.name, + :title => _('VMware Credential'), + :link => url_for_only_path(:action => 'show', :id => credential.id, :controller => 'ansible_credential')} + end + def credential(credential, label) {:label => label, :value => credential.name} end