mirror of https://github.com/rancher/ui.git
Display hosted k8s cluster region in cluster dashboard
This commit is contained in:
parent
9278f01d96
commit
d7376e21cb
|
|
@ -144,6 +144,14 @@ export default Resource.extend(Grafana, ResourceUsage, {
|
|||
return get(this, 'configName') === 'rancherKubernetesEngineConfig';
|
||||
}),
|
||||
|
||||
displayLocation: computed('configName', function() {
|
||||
const configName = this.configName;
|
||||
|
||||
if ( configName ) {
|
||||
return get(this, `${ configName }.region`) || get(this, `${ configName }.location`) || get(this, `${ configName }.zone`);
|
||||
}
|
||||
}),
|
||||
|
||||
provider: computed('configName', 'nodePools.@each.{driver,nodeTemplateId}', 'driver', function() {
|
||||
const pools = get(this, 'nodePools') || [];
|
||||
const firstPool = pools.objectAt(0);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
<div class="vertical-middle">
|
||||
<label class="acc-label vertical-middle p-0">{{t 'clustersPage.provider.label'}}:</label>
|
||||
<span>{{cluster.displayProvider}}</span>
|
||||
{{#if cluster.displayLocation}}
|
||||
<span class="text-muted">({{cluster.displayLocation}})</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="vertical-middle">
|
||||
|
|
|
|||
Loading…
Reference in New Issue