Reset network / user script when choosing ostype from windows to linux (#292)

* reset network / user script when choosing windows

Signed-off-by: Andy Lee <andy.lee@suse.com>

* change OS type from Windows init user and network data

Signed-off-by: Andy Lee <andy.lee@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee
2025-05-14 14:15:39 +08:00
committed by GitHub
parent 0cd5651c38
commit 63c4810b99
4 changed files with 21 additions and 2 deletions
+4 -2
View File
@@ -1533,6 +1533,7 @@ export default {
if (val) {
this['sshKey'] = [];
this['userScript'] = undefined;
this['networkScript'] = undefined;
this['installAgent'] = false;
}
},
@@ -1590,8 +1591,9 @@ export default {
}
},
osType(neu) {
const out = this.getUserData({ installAgent: this.installAgent, osType: neu });
osType(neu, old) {
this.installAgent = old === 'windows' ? true : this.installAgent;
const out = old === 'windows' ? this.getInitUserData({ osType: neu }) : this.getUserData({ installAgent: this.installAgent, osType: neu });
this['userScript'] = out;
this.refreshYamlEditor();