% # This template can be configure the following way with environment variables # CONSUL_TOOLS_SUFFIX: suffix for the address of consul tools # CONSUL_TOOLS_PREFIX: prefix for the address of consul tools # CONSUL_TOOLS: comma sperated list of consul tools tools = (ENV['CONSUL_TOOLS'] || 'services,nodes,keys,timeline').split(",") tools_suffix = ENV['CONSUL_TOOLS_PREFIX'] || '-ui.html' tools_prefix = ENV['CONSUL_TOOLS_SUFFIX'] || 'consul-' dc_suffix = ENV['CONSUL_DC_SUFFIX'] || '' dc_prefix = ENV['CONSUL_DC_PREFIX'] || '#' # CUSTOM_LINKS: A comma separated list of URLs to add to the header in the format: [linkname](actuallink) # Example: [Consul template erb](https://github.com/criteo/consul-templaterb),[anotherlink](#) custom_links = (ENV['CUSTOM_LINKS'] || '').split(",") links_to_display = {} if !custom_links.empty? custom_links.each do |link| if /\[.*\]\(.*\)/ =~ link link_data = /\[(.*)\]\((.*)\)/.match(link) links_to_display[link_data[1]] = link_data[2] end end end %>