mirror of https://github.com/rancher/dashboard.git
Fix question charts saving to values (#1221)
This commit is contained in:
parent
7dd90c7777
commit
000ad98d30
|
|
@ -306,6 +306,10 @@ export default {
|
|||
|
||||
return EDITOR_MODES.EDIT_CODE;
|
||||
},
|
||||
|
||||
hasQuestions() {
|
||||
return this.versionInfo && !!this.versionInfo.questions;
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
|
@ -525,7 +529,7 @@ export default {
|
|||
actionInput(isUpgrade) {
|
||||
const fromChart = this.versionInfo.values || {};
|
||||
|
||||
if ( !this.valuesComponent ) {
|
||||
if ( !this.valuesComponent && !this.hasQuestions ) {
|
||||
try {
|
||||
this.chartValues = jsyaml.safeLoad(this.valuesYaml);
|
||||
} catch (err) {
|
||||
|
|
@ -787,7 +791,7 @@ export default {
|
|||
</tab>
|
||||
</template>
|
||||
<Questions
|
||||
v-else-if="versionInfo && versionInfo.questions"
|
||||
v-else-if="hasQuestions"
|
||||
v-model="chartValues"
|
||||
:chart="chart"
|
||||
:version="version"
|
||||
|
|
|
|||
|
|
@ -958,10 +958,10 @@ export default {
|
|||
|
||||
for ( const item of items ) {
|
||||
let name = `${ item.nameDisplay }.yaml`;
|
||||
const i = 2;
|
||||
let i = 2;
|
||||
|
||||
while ( names.includes(name) ) {
|
||||
name = `${ item.nameDisplay }_${ i }.yaml`;
|
||||
name = `${ item.nameDisplay }_${ i++ }.yaml`;
|
||||
}
|
||||
|
||||
names.push(name);
|
||||
|
|
|
|||
Loading…
Reference in New Issue