ui: All metrics cards should default to the default nspace if not set (#9223)

* ui: All metrics cards should default to the default nspace if not set

* Use the up/downstream as the data/nspace for up/downstreams not the service
This commit is contained in:
John Cowen 2020-11-19 16:03:26 +00:00 committed by GitHub
parent 4eb64e0dea
commit 1332c312b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@
{{#if (and @hasMetricsProvider (not-eq @service.Kind 'ingress-gateway'))}}
{{#if (eq @type 'upstream')}}
<TopologyMetrics::Stats
@nspace={{@item.Namespace}}
@nspace={{or @item.Namespace 'default'}}
@dc={{@item.Datacenter}}
@endpoint='upstream-summary-for-service'
@service={{@service.Service}}
@ -56,7 +56,7 @@
/>
{{else}}
<TopologyMetrics::Stats
@nspace={{@item.Namespace}}
@nspace={{or @item.Namespace 'default'}}
@dc={{@item.Datacenter}}
@endpoint='downstream-summary-for-service'
@service={{@service.Service}}

View File

@ -33,7 +33,7 @@
</div>
{{#if this.hasMetricsProvider }}
<TopologyMetrics::Series
@nspace={{@service.Service.Namespace}}
@nspace={{or @service.Service.Namespace 'default'}}
@dc={{@dc}}
@service={{@service.Service.Service}}
@protocol={{@topology.Protocol}}
@ -41,7 +41,7 @@
/>
{{#if (not-eq @service.Service.Kind 'ingress-gateway')}}
<TopologyMetrics::Stats
@nspace={{@service.Service.Namespace}}
@nspace={{or @service.Service.Namespace 'default'}}
@dc={{@dc}}
@endpoint='summary-for-service'
@service={{@service.Service.Service}}