From ed21f3ffbc0dea8f2eb34d1332517b12a713164a Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Mon, 2 Nov 2020 09:53:56 -0700 Subject: [PATCH] Add rancherd to displayproviders rancher/rancher#28651 --- app/models/cluster.js | 13 +++++++++---- translations/en-us.yaml | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/models/cluster.js b/app/models/cluster.js index db21291ea..51bab65b9 100644 --- a/app/models/cluster.js +++ b/app/models/cluster.js @@ -218,10 +218,9 @@ export default Resource.extend(Grafana, ResourceUsage, { return 'custom'; } - return firstPool.driver || get(firstPool, 'nodeTemplate.driver') || null; default: - if (get(this, 'driver') && get(this, 'configName')) { + if (get(this, 'driver')) { return get(this, 'driver'); } else { return 'import'; @@ -234,6 +233,7 @@ export default Resource.extend(Grafana, ResourceUsage, { const pools = get(this, 'nodePools'); const firstPool = (pools || []).objectAt(0); const configName = get(this, 'configName'); + const driverName = get(this, 'driver'); switch ( configName ) { case 'amazonElasticContainerServiceConfig': @@ -267,8 +267,13 @@ export default Resource.extend(Grafana, ResourceUsage, { return intl.t('clusterNew.custom.shortLabel'); } default: - if (get(this, 'driver') && get(this, 'configName')) { - return get(this, 'driver').capitalize(); + if (driverName) { + switch (driverName) { + case 'rancherd': + return intl.t('clusterNew.rancherd.shortLabel'); + default: + return driverName.capitalize(); + } } else { return intl.t('clusterNew.import.shortLabel'); } diff --git a/translations/en-us.yaml b/translations/en-us.yaml index ebd275762..e69dce450 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -4178,6 +4178,8 @@ clusterNew: quick: Quick Create custom: Custom Create existing: Existing + rancherd: + shortLabel: RancherD rke: upgradeStrategy: