pass showYaml prop to prevent double generate secret (#243)

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee
2025-04-15 16:05:13 +08:00
committed by GitHub
parent eb92642b3b
commit daa6d6942b
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -140,6 +140,7 @@ export default {
return {
OS,
isClone,
showYaml: false,
spec: null,
osType: 'linux',
sshKey: [],
@@ -269,7 +270,7 @@ export default {
needNewSecret() {
// When creating a template it is always necessary to create a new secret.
return this.resourceType === HCI.VM_VERSION || this.isCreate;
return this.showYaml ? false : this.resourceType === HCI.VM_VERSION || this.isCreate;
},
defaultTerminationSetting() {
@@ -669,7 +670,7 @@ export default {
}
});
if (!this.secretName) {
if (this.needNewSecret || !this.secretName) {
this.secretName = this.generateSecretName(this.secretNamePrefix);
}