ui: Add `Service.Namespace` variable to dashboard URL templates (#11640)
We currently allow only Datacenter, Service.Name, this PR adds Service.Namespace.
This commit is contained in:
parent
124fa8f168
commit
635d773ae6
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: Include `Service.Namespace` into available variables for `dashboard_url_templates`
|
||||
```
|
|
@ -186,10 +186,16 @@ as |items item dc|}}
|
|||
}}
|
||||
as |config|>
|
||||
{{#if config.data.dashboard_url_templates.service}}
|
||||
<a href={{render-template config.data.dashboard_url_templates.service (hash
|
||||
<a
|
||||
href={{render-template config.data.dashboard_url_templates.service
|
||||
(hash
|
||||
Datacenter=dc.Name
|
||||
Service=(hash Name=item.Service.Service)
|
||||
)}}
|
||||
Service=(hash
|
||||
Name=item.Service.Service
|
||||
Namespace=(or item.Service.Namespace '')
|
||||
)
|
||||
)
|
||||
}}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
data-test-dashboard-anchor
|
||||
|
|
|
@ -103,10 +103,15 @@ as |nspace dc items topology|}}
|
|||
@service={{items.firstObject}}
|
||||
@topology={{topology}}
|
||||
|
||||
@metricsHref={{render-template config.data.dashboard_url_templates.service (hash
|
||||
@metricsHref={{render-template config.data.dashboard_url_templates.service
|
||||
(hash
|
||||
Datacenter=dc.Name
|
||||
Service=items.firstObject
|
||||
)}}
|
||||
Service=(hash
|
||||
Name=items.firstObject.Name
|
||||
Namespace=(or items.firstObject.Namespace '')
|
||||
)
|
||||
)
|
||||
}}
|
||||
@isRemoteDC={{not dc.Local}}
|
||||
@hasMetricsProvider={{gt config.data.metrics_provider.length 0}}
|
||||
@oncreate={{route-action 'createIntention'}}
|
||||
|
|
Loading…
Reference in New Issue