Skip to content

Commit

Permalink
Show VMware credential in service provisioning summary
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Apr 26, 2017
1 parent 175f2db commit e2257c3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/helpers/service_helper/textual_summary.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2257c3

Please sign in to comment.