From 775856f027fe644c5c7a4f608d50234368c5902b Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Wed, 7 Aug 2019 13:38:33 -0700 Subject: [PATCH 1/3] Remove search from form-share-member rancher/rancher#22039 --- lib/shared/addon/components/form-share-member/template.hbs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/shared/addon/components/form-share-member/template.hbs b/lib/shared/addon/components/form-share-member/template.hbs index 5323afb91..0bc1b134f 100644 --- a/lib/shared/addon/components/form-share-member/template.hbs +++ b/lib/shared/addon/components/form-share-member/template.hbs @@ -22,6 +22,7 @@ @pagingLabel="pagination.cluster" @headers={{membersHeaders}} @stickyHeader={{false}} + @search={{false}} as |sortable kind member dt| > {{#if (eq kind "row")}} From 705a863c5881d27cb54a0efeec5aa41508ed7b6d Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Wed, 7 Aug 2019 14:44:40 -0700 Subject: [PATCH 2/3] Fix private registry display and default issues rancher/rancher#21567 --- .../cluster-driver/driver-rke/component.js | 7 ++++++- .../cru-private-registry/component.js | 18 ++++++++---------- lib/shared/addon/utils/constants.js | 4 +++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/shared/addon/components/cluster-driver/driver-rke/component.js b/lib/shared/addon/components/cluster-driver/driver-rke/component.js index ece6ee127..fd2af0fdb 100644 --- a/lib/shared/addon/components/cluster-driver/driver-rke/component.js +++ b/lib/shared/addon/components/cluster-driver/driver-rke/component.js @@ -269,6 +269,11 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, { hideQuestion }); + if (path.includes('rancherKubernetesEngineConfig.privateRegistries[0]')) { + // need to replace the array target with built in first object so the alias works + path = path.replace('[0]', '.firstObject'); + } + defineProperty(question, 'default', alias(`primaryResource.${ path }`)); clusterTemplateQuestions.pushObject(question); @@ -1220,7 +1225,7 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, { this.notifyPropertyChange('initialNodeCounts'); }); - if (this.isEdit && this.cluster.appliedSpec) { + if (this.isEdit && !isEmpty(get(this, 'cluster.appliedSpec.rancherKubernetesEngineConfig.kubernetesVersion'))) { initialVersion = this.cluster.appliedSpec.rancherKubernetesEngineConfig.kubernetesVersion; } diff --git a/lib/shared/addon/components/cru-private-registry/component.js b/lib/shared/addon/components/cru-private-registry/component.js index aeb978ef4..1e75ee2cd 100644 --- a/lib/shared/addon/components/cru-private-registry/component.js +++ b/lib/shared/addon/components/cru-private-registry/component.js @@ -34,18 +34,16 @@ export default Component.extend({ init() { this._super(...arguments); - scheduleOnce('afterRender', () => { - set(this, 'config', get(this, `cluster.${ get(this, 'configName') }`)); + set(this, 'config', get(this, `cluster.${ get(this, 'configName') }`)); - if (this.config.privateRegistries) { - if ( this.config.privateRegistries.length >= 1 ) { - setProperties(this, { - privateRegistry: get(this, 'config.privateRegistries.firstObject'), - enablePrivateRegistry: true, - }); - } + if (this.config.privateRegistries) { + if ( this.config.privateRegistries.length >= 1 ) { + setProperties(this, { + privateRegistry: get(this, 'config.privateRegistries.firstObject'), + enablePrivateRegistry: true, + }); } - }); + } }, actions: { diff --git a/lib/shared/addon/utils/constants.js b/lib/shared/addon/utils/constants.js index e8b49736b..6f13e34a2 100644 --- a/lib/shared/addon/utils/constants.js +++ b/lib/shared/addon/utils/constants.js @@ -859,7 +859,9 @@ C.CLUSTER_TEMPLATE_IGNORED_OVERRIDES = [ 'rancherKubernetesEngineConfig.network.options.flannel_backend_vni', 'rancherKubernetesEngineConfig.network.plugin', 'rancherKubernetesEngineConfig.network.weaveNetworkProvider', - 'rancherKubernetesEngineConfig.privateRegistries[]', + 'rancherKubernetesEngineConfig.privateRegistries[0].url', + 'rancherKubernetesEngineConfig.privateRegistries[0].user', + 'rancherKubernetesEngineConfig.privateRegistries[0].password', 'rancherKubernetesEngineConfig.services.etcd.backupConfig.enabled', 'rancherKubernetesEngineConfig.services.etcd.backupConfig.intervalHours', 'rancherKubernetesEngineConfig.services.etcd.backupConfig.retention', From 721e7935031c2df10771bc0c3645158116e79153 Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Wed, 7 Aug 2019 14:49:54 -0700 Subject: [PATCH 3/3] lint --- lib/shared/addon/components/cru-private-registry/component.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/shared/addon/components/cru-private-registry/component.js b/lib/shared/addon/components/cru-private-registry/component.js index 1e75ee2cd..67a2750f9 100644 --- a/lib/shared/addon/components/cru-private-registry/component.js +++ b/lib/shared/addon/components/cru-private-registry/component.js @@ -8,7 +8,6 @@ import { } from '@ember/object'; import { alias, gt } from '@ember/object/computed'; import { inject as service } from '@ember/service'; -import { scheduleOnce } from '@ember/runloop'; export default Component.extend({ globalStore: service(),