diff --git a/ui/packages/consul-ui/app/components/topology-metrics/card.hbs b/ui/packages/consul-ui/app/components/topology-metrics/card.hbs
index 8ab57c2e18..00d70b0706 100644
--- a/ui/packages/consul-ui/app/components/topology-metrics/card.hbs
+++ b/ui/packages/consul-ui/app/components/topology-metrics/card.hbs
@@ -44,7 +44,7 @@
{{/if}}
- {{#if @hasMetricsProvider }}
+ {{#if (and @hasMetricsProvider (not-eq @service.Kind 'ingress-gateway'))}}
{{#if (eq @type 'upstream')}}
{{/if}}
{{/if}}
-
\ No newline at end of file
+
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 5790042c59..7e0b77e95c 100644
--- a/ui/packages/consul-ui/app/components/topology-metrics/index.hbs
+++ b/ui/packages/consul-ui/app/components/topology-metrics/index.hbs
@@ -37,6 +37,7 @@
@protocol={{@topology.Protocol}}
@noMetricsReason={{this.noMetricsReason}}
/>
+ {{#if (not-eq @service.Service.Kind 'ingress-gateway')}}
+ {{/if}}
{{/if}}
{{#if @metricsHref}}
@@ -94,4 +96,4 @@
@oncreate={{action @oncreate}}
/>
-
\ No newline at end of file
+
diff --git a/ui/packages/consul-ui/app/components/topology-metrics/index.js b/ui/packages/consul-ui/app/components/topology-metrics/index.js
index c26961ba96..cb2846e27b 100644
--- a/ui/packages/consul-ui/app/components/topology-metrics/index.js
+++ b/ui/packages/consul-ui/app/components/topology-metrics/index.js
@@ -26,7 +26,10 @@ export default class TopologyMetrics extends Component {
// TODO we can make the configurable even before we have a full solution for
// multi-DC forwarding for Prometheus so providers that are global for all
// DCs like an external managed APM can still load in all DCs.
- if (this.env.var('CONSUL_DATACENTER_LOCAL') != this.args.topology.get('Datacenter')) {
+ if (
+ this.env.var('CONSUL_DATACENTER_LOCAL') !== this.args.topology.get('Datacenter') ||
+ this.args.service.Service.Kind === 'ingress-gateway'
+ ) {
this.noMetricsReason = 'Unable to fetch metrics for a remote datacenter';
}
}
diff --git a/ui/packages/consul-ui/app/routes/dc/services/show/index.js b/ui/packages/consul-ui/app/routes/dc/services/show/index.js
index a514377a94..18647d63fe 100644
--- a/ui/packages/consul-ui/app/routes/dc/services/show/index.js
+++ b/ui/packages/consul-ui/app/routes/dc/services/show/index.js
@@ -11,29 +11,25 @@ export default class IndexRoute extends Route {
// so check the length here.
let to = 'topology';
const parentModel = this.modelFor(parent);
- const hasProxy = get(parentModel, 'proxies');
+ const hasProxy = get(parentModel, 'proxies.length') !== 0;
const kind = get(parentModel, 'items.firstObject.Service.Kind');
- if (hasProxy.length === 0) {
- to = 'instances';
- } else {
- switch (kind) {
- case 'ingress-gateway':
- if (!get(parentModel, 'topology.Datacenter')) {
- to = 'upstreams';
- }
- break;
- case 'terminating-gateway':
- to = 'services';
- break;
- case 'mesh-gateway':
+ switch (kind) {
+ case 'ingress-gateway':
+ if (!get(parentModel, 'topology.Datacenter')) {
+ to = 'upstreams';
+ }
+ break;
+ case 'terminating-gateway':
+ to = 'services';
+ break;
+ case 'mesh-gateway':
+ to = 'instances';
+ break;
+ default:
+ if (!hasProxy || !get(parentModel, 'topology.Datacenter')) {
to = 'instances';
- break;
- default:
- if (!get(parentModel, 'topology.Datacenter')) {
- to = 'instances';
- }
- }
+ }
}
this.replaceWith(`${parent}.${to}`, parentModel);
diff --git a/ui/packages/consul-ui/app/templates/dc/services/show.hbs b/ui/packages/consul-ui/app/templates/dc/services/show.hbs
index 0eb0aacb1f..c5f454158f 100644
--- a/ui/packages/consul-ui/app/templates/dc/services/show.hbs
+++ b/ui/packages/consul-ui/app/templates/dc/services/show.hbs
@@ -29,7 +29,7 @@