Skip to content

Commit

Permalink
Merge pull request #2491 from zeari/fix_endpoints
Browse files Browse the repository at this point in the history
Fix container provider endpoint configuration
  • Loading branch information
mzazrivec authored Oct 27, 2017
2 parents 58db012 + 031eca4 commit 81cbdc1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/controllers/mixins/ems_common_angular.rb
Original file line number Diff line number Diff line change
Expand Up @@ -517,17 +517,16 @@ def set_ems_record_vars(ems, mode = nil)
default_endpoint = {:role => :default, :hostname => hostname, :port => port}
default_endpoint.merge!(endpoint_security_options(ems.security_protocol, default_tls_ca_certs))
if params[:metrics_selection] == 'hawkular'
params[:cred_type] = "hawkular"
params[:cred_type] = "hawkular" if params[:cred_type] == "metrics"
hawkular_endpoint = {:role => :hawkular, :hostname => metrics_hostname, :port => metrics_port}
hawkular_endpoint.merge!(endpoint_security_options(metrics_security_protocol, metrics_tls_ca_certs))
elsif params[:metrics_selection] == 'prometheus'
params[:cred_type] = "prometheus"
params[:cred_type] = "prometheus" if params[:cred_type] == "metrics"
prometheus_endpoint = {:role => :prometheus, :hostname => metrics_hostname, :port => metrics_port}
prometheus_endpoint.merge!(endpoint_security_options(metrics_security_protocol, metrics_tls_ca_certs))
end

if params[:alerts_selection] == 'prometheus'
params[:cred_type] = "prometheus_alerts"
prometheus_alerts_endpoint = {:role => :prometheus_alerts, :hostname => prometheus_alerts_hostname, :port => prometheus_alerts_api_port}
prometheus_alerts_endpoint.merge!(endpoint_security_options(prometheus_alerts_security_protocol, prometheus_alerts_tls_ca_certs))
end
Expand Down

0 comments on commit 81cbdc1

Please sign in to comment.