Merge pull request #4270 from westlywright/feature.rancherd.displaydriver

RancherD Display Provider
This commit is contained in:
Westly Wright 2020-11-12 13:59:42 -07:00 committed by GitHub
commit 084bc17488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -231,10 +231,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';
@ -247,6 +246,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':
@ -280,8 +280,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');
}

View File

@ -4182,6 +4182,8 @@ clusterNew:
quick: Quick Create
custom: Custom Create
existing: Existing
rancherd:
shortLabel: RancherD
rke:
upgradeStrategy: