From 355ab6705b97c38b8601d6fe0403c43507440ce0 Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Wed, 5 May 2021 15:43:03 +0100 Subject: [PATCH] Tweaks --- assets/images/providers/azure.svg | 20 +++++++++++++++++++ assets/translations/en-us.yaml | 10 ++++------ edit/provisioning.cattle.io.cluster/index.vue | 13 +++++++++--- 3 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 assets/images/providers/azure.svg diff --git a/assets/images/providers/azure.svg b/assets/images/providers/azure.svg new file mode 100644 index 0000000000..8f3e52bcb1 --- /dev/null +++ b/assets/images/providers/azure.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + diff --git a/assets/translations/en-us.yaml b/assets/translations/en-us.yaml index 5e0d87a1cb..08caecdfd4 100644 --- a/assets/translations/en-us.yaml +++ b/assets/translations/en-us.yaml @@ -128,7 +128,6 @@ product: clusterManagement: Cluster Management monitoring: Monitoring - suffix: percent: "%" cpus: CPUs @@ -159,10 +158,8 @@ accountAndKeys: change: Change Password apiKeys: title: API Keys - notAllowed: You do not have permission to manage API Keys - add: - description: - label: Description + notAllowed: You do no +n placeholder: Optionally enter a description to help you identify this API Key label: Create API Key expiry: @@ -871,7 +868,8 @@ cluster: providerGroup: create-custom: Use existing nodes and create a cluster using RKE create-kontainer: Create a cluster in a hosted Kuberetes provider - create-machine: Provision new nodes and create a cluster using RKE + create-machine: Provision new nodes and create a cluster using RKE2 + create-machine1: Provision new nodes and create a cluster using RKE create-template: Use a Catalog Template to create a cluster register-custom: Import any Kubernetes cluster rke2: diff --git a/edit/provisioning.cattle.io.cluster/index.vue b/edit/provisioning.cattle.io.cluster/index.vue index 0112af62d7..2c626328ed 100644 --- a/edit/provisioning.cattle.io.cluster/index.vue +++ b/edit/provisioning.cattle.io.cluster/index.vue @@ -26,6 +26,12 @@ const SORT_GROUPS = { custom1: 5, }; +// Map some provider IDs to icon names where they don't directly match +const ICON_MAPPINGS = { + //azure: 'azureaks', + linode: 'linodelke', +} + export default { name: 'CruCluster', @@ -120,13 +126,12 @@ export default { const rkeMachineTypes = []; // 'amazonec2', 'azure', 'digitalocean', 'linode', 'vsphere']; - // TODO: Sort - // TODO: Can list refresh when the node drivers are activated/deactivated in another session? this.nodeDrivers.forEach((nd) => { if (nd.spec.active) { rkeMachineTypes.push(nd.id); } }); + rkeMachineTypes.sort(); kontainerTypes.forEach((id) => { addType(id, 'kontainer', true); @@ -165,9 +170,11 @@ export default { const description = getters['i18n/withFallback'](`cluster.providerDescription."${ id }"`, null, ''); let icon = require('~/assets/images/generic-driver.svg'); + const iconID = ICON_MAPPINGS[id] || id; + if ( group !== 'template' ) { try { - icon = require(`~/assets/images/providers/${ id }.svg`); + icon = require(`~/assets/images/providers/${ iconID }.svg`); } catch (e) {} }