Skip to content

Commit

Permalink
Merge pull request #1525 from nimrodshn/add_prometheus_endpoint_to_su…
Browse files Browse the repository at this point in the history
…mmary

Support for Prometheus in Container Provider summary page
  • Loading branch information
mzazrivec committed Jun 14, 2017
2 parents 02b6680 + 1a69170 commit cb8393a
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions app/helpers/ems_container_helper/textual_summary.rb
Expand Up @@ -103,21 +103,17 @@ def textual_volumes
end

def textual_group_endpoints
return unless @record.connection_configurations.hawkular
endpoints = @record.endpoints.where.not(:role => 'default')
return if endpoints.nil?

TextualGroup.new(
_("Endpoints"),
endpoint_groups = endpoints.map do |e|
[
{
:label => _('Hawkular Host Name'),
:value => @record.connection_configurations.hawkular.endpoint.hostname
},
{
:label => _('Hawkular API Port'),
:value => @record.connection_configurations.hawkular.endpoint.port
}
{:label => _("%{role} Host Name") % {:role => e.role.capitalize}, :value => e.hostname},
{:label => _("%{role} API Port") % {:role => e.role.capitalize}, :value => e.port}
]
)
end

TextualGroup.new(_("Endpoints"), endpoint_groups.flatten)
end

def textual_group_miq_custom_attributes
Expand Down

0 comments on commit cb8393a

Please sign in to comment.