mirror of https://github.com/rancher/ui.git
Fix edit custom cluster step 2 btn state and two way bindings
This commit is contained in:
parent
6e4dde97f5
commit
9b6ce16bcc
|
|
@ -515,6 +515,11 @@ export default InputTextFile.extend(ManageLabels, ClusterDriver, {
|
||||||
|
|
||||||
agentEnvVars: computed('cluster.agentEnvVars.[]', {
|
agentEnvVars: computed('cluster.agentEnvVars.[]', {
|
||||||
get() {
|
get() {
|
||||||
|
if (!this.cluster?.agentEnvVars) {
|
||||||
|
// if undefined two way binding doesn't seem to work
|
||||||
|
set(this, 'cluster.agentEnvVars', []);
|
||||||
|
}
|
||||||
|
|
||||||
return get(this, 'cluster.agentEnvVars') || [];
|
return get(this, 'cluster.agentEnvVars') || [];
|
||||||
},
|
},
|
||||||
set(_key, value) {
|
set(_key, value) {
|
||||||
|
|
|
||||||
|
|
@ -1370,7 +1370,7 @@
|
||||||
|
|
||||||
{{top-errors errors=allErrors}}
|
{{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) )}}
|
{{#if (and clusterTemplatesEnforced (not clusterTemplateRevisionId) )}}
|
||||||
<section class="mt-20 mb-20">
|
<section class="mt-20 mb-20">
|
||||||
<BannerMessage
|
<BannerMessage
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,11 @@ export default Component.extend(ViewNewEdit, ChildHook, {
|
||||||
|
|
||||||
agentEnvVars: computed('cluster.agentEnvVars.[]', {
|
agentEnvVars: computed('cluster.agentEnvVars.[]', {
|
||||||
get() {
|
get() {
|
||||||
|
if (!this.cluster?.agentEnvVars) {
|
||||||
|
// if undefined two way binding doesn't seem to work
|
||||||
|
set(this, 'cluster.agentEnvVars', []);
|
||||||
|
}
|
||||||
|
|
||||||
return get(this, 'cluster.agentEnvVars') || [];
|
return get(this, 'cluster.agentEnvVars') || [];
|
||||||
},
|
},
|
||||||
set(_key, value) {
|
set(_key, value) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue