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
@@ -20,6 +20,10 @@ export default {
type: String,
default: 'create'
},
osType: {
type: String,
default: ''
},
value: {
type: String,
default: ''
@@ -64,6 +68,12 @@ export default {
},
watch: {
osType(neu) {
if (neu === 'windows') {
this.id = '';
}
},
value(neu) {
this.yamlScript = neu;
},
@@ -28,6 +28,10 @@ export default {
type: String,
default: ''
},
osType: {
type: String,
default: ''
},
userScript: {
type: String,
default: ''
@@ -203,6 +207,7 @@ export default {
<DataTemplate
ref="userTemplate"
:value="userScript"
:os-type="osType"
type="user"
:view-code="viewCode"
:mode="mode"
@@ -219,6 +224,7 @@ export default {
ref="networkTemplate"
:value="networkScript"
type="network"
:os-type="osType"
:view-code="viewCode"
:mode="mode"
:config-id="configNetworkId"
@@ -862,6 +862,7 @@ export default {
ref="yamlEditor"
:user-script="userScript"
:mode="mode"
:os-type="osType"
:view-code="isWindows"
:namespace="value.metadata.namespace"
:network-script="networkScript"