diff --git a/ui/packages/consul-ui/app/components/topology-metrics/index.hbs b/ui/packages/consul-ui/app/components/topology-metrics/index.hbs index f615c381b..da71d3332 100644 --- a/ui/packages/consul-ui/app/components/topology-metrics/index.hbs +++ b/ui/packages/consul-ui/app/components/topology-metrics/index.hbs @@ -29,9 +29,9 @@ {{/if}} diff --git a/ui/packages/consul-ui/app/components/topology-metrics/skin.scss b/ui/packages/consul-ui/app/components/topology-metrics/skin.scss index 2fb25f5fc..7fd958974 100644 --- a/ui/packages/consul-ui/app/components/topology-metrics/skin.scss +++ b/ui/packages/consul-ui/app/components/topology-metrics/skin.scss @@ -82,7 +82,7 @@ .metrics-link::before { @extend %with-exit-mask, %as-pseudo; } - .settings-link::before { + .config-link::before { @extend %with-docs-mask, %as-pseudo; } } diff --git a/ui/packages/consul-ui/app/routes/dc/services/show.js b/ui/packages/consul-ui/app/routes/dc/services/show.js index 63e621b35..8b9a72ca3 100644 --- a/ui/packages/consul-ui/app/routes/dc/services/show.js +++ b/ui/packages/consul-ui/app/routes/dc/services/show.js @@ -5,7 +5,7 @@ import { get } from '@ember/object'; export default Route.extend({ data: service('data-source/service'), - settings: service('settings'), + config: service('ui-config'), model: function(params, transition) { const dc = this.modelFor('dc').dc.Name; const nspace = this.modelFor('nspace').nspace.substr(1); @@ -16,7 +16,7 @@ export default Route.extend({ items: this.data.source( uri => uri`/${nspace}/${dc}/service-instances/for-service/${params.name}` ), - urls: this.settings.findBySlug('urls'), + urls: this.config.get().dashboard_url_template, chain: null, proxies: [], topology: null, diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs index 2e5edbb2e..fda0cfbb0 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs @@ -7,9 +7,9 @@ @upstreams={{topology.Upstreams}} @downstreams={{filter-by 'Datacenter' topology.Datacenter topology.Downstreams}} @dc={{topology.Datacenter}} - @metricsHref={{render-template urls.service (hash + @metricsHref={{render-template urls.services (hash Datacenter=dc - Service=(hash Name=item.Service.Service) + Service=items.firstObject )}} /> {{else}} diff --git a/ui/packages/consul-ui/app/templates/settings.hbs b/ui/packages/consul-ui/app/templates/settings.hbs index 94e719bed..0bd92ac6c 100644 --- a/ui/packages/consul-ui/app/templates/settings.hbs +++ b/ui/packages/consul-ui/app/templates/settings.hbs @@ -13,17 +13,6 @@

-
-

Dashboard Links

-

- Add a link to the service detail page in the UI to get quick access to a service-wide metrics dashboard. Enter the dashboard URL into the field below. You can use the placeholders {{'{{Datacenter}}'}} and {{'{{Service.Name}}'}} which will be replaced with the name of the datacenter/service currently being viewed. -

- -
{{#if (not (env 'CONSUL_UI_DISABLE_REALTIME'))}}

Blocking Queries

diff --git a/ui/packages/consul-ui/lib/startup/templates/head.html.js b/ui/packages/consul-ui/lib/startup/templates/head.html.js index 5442607c2..83c4916d4 100644 --- a/ui/packages/consul-ui/lib/startup/templates/head.html.js +++ b/ui/packages/consul-ui/lib/startup/templates/head.html.js @@ -3,7 +3,15 @@ module.exports = ({ appName, environment, rootURL, config }) => ` diff --git a/ui/packages/consul-ui/tests/acceptance/dc/services/show.feature b/ui/packages/consul-ui/tests/acceptance/dc/services/show.feature index 47859dcf6..39b298723 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/services/show.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/services/show.feature @@ -103,14 +103,9 @@ Feature: dc / services / show: Show Service --- Scenario: Given a dashboard template has been set Given 1 datacenter model with the value "dc1" - And settings from yaml - --- - consul:urls: - service: https://consul.io?service-name={{Service.Name}}&dc={{Datacenter}} - --- When I visit the service page for yaml --- dc: dc1 service: service-0 --- - And I see href on the dashboardAnchor like "https://consul.io?service-name=service-0&dc=dc1" + And I see href on the dashboardAnchor like "https://example.com?service-0-with-id&dc1"