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

View File

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