mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
Signed-off-by: Andy Lee <andy.lee@suse.com> (cherry picked from commit daa6d6942b1d3dfb7c56f11aed73cd9d8d28242d) Co-authored-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
cd6ea6e402
commit
9fac43d5e5
@ -485,6 +485,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
generateYaml() {
|
generateYaml() {
|
||||||
|
this.showYaml = this?.$refs?.vmCruResource?.showYaml || false;
|
||||||
this.parseVM();
|
this.parseVM();
|
||||||
const out = saferDump(this.value);
|
const out = saferDump(this.value);
|
||||||
|
|
||||||
@ -498,6 +499,7 @@ export default {
|
|||||||
<CruResource
|
<CruResource
|
||||||
v-if="spec"
|
v-if="spec"
|
||||||
id="vm"
|
id="vm"
|
||||||
|
ref="vmCruResource"
|
||||||
:done-route="doneRoute"
|
:done-route="doneRoute"
|
||||||
:resource="value"
|
:resource="value"
|
||||||
:cancel-event="true"
|
:cancel-event="true"
|
||||||
|
|||||||
@ -140,6 +140,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
OS,
|
OS,
|
||||||
isClone,
|
isClone,
|
||||||
|
showYaml: false,
|
||||||
spec: null,
|
spec: null,
|
||||||
osType: 'linux',
|
osType: 'linux',
|
||||||
sshKey: [],
|
sshKey: [],
|
||||||
@ -269,7 +270,7 @@ export default {
|
|||||||
|
|
||||||
needNewSecret() {
|
needNewSecret() {
|
||||||
// When creating a template it is always necessary to create a new secret.
|
// 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() {
|
defaultTerminationSetting() {
|
||||||
@ -669,7 +670,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!this.secretName) {
|
if (this.needNewSecret || !this.secretName) {
|
||||||
this.secretName = this.generateSecretName(this.secretNamePrefix);
|
this.secretName = this.generateSecretName(this.secretNamePrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user