Fix edit custom cluster step 2 btn state and two way bindings

This commit is contained in:
Westly Wright 2021-03-15 16:04:14 -07:00
parent 6e4dde97f5
commit 9b6ce16bcc
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
3 changed files with 11 additions and 1 deletions

View File

@ -515,6 +515,11 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
agentEnvVars: computed('cluster.agentEnvVars.[]', {
get() {
if (!this.cluster?.agentEnvVars) {
// if undefined two way binding doesn't seem to work
set(this, 'cluster.agentEnvVars', []);
}
return get(this, 'cluster.agentEnvVars') || [];
},
set(_key, value) {

View File

@ -1370,7 +1370,7 @@
{{top-errors errors=allErrors}}
{{#if (or (and notView (eq step 1)) (and isEdit (eq step 2)))}}
{{#if (or (and notView (eq step 1)) (and (and (not isPostSave) isEdit) (eq step 2)))}}
{{#if (and clusterTemplatesEnforced (not clusterTemplateRevisionId) )}}
<section class="mt-20 mb-20">
<BannerMessage

View File

@ -138,6 +138,11 @@ export default Component.extend(ViewNewEdit, ChildHook, {
agentEnvVars: computed('cluster.agentEnvVars.[]', {
get() {
if (!this.cluster?.agentEnvVars) {
// if undefined two way binding doesn't seem to work
set(this, 'cluster.agentEnvVars', []);
}
return get(this, 'cluster.agentEnvVars') || [];
},
set(_key, value) {