mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
config_tools: fix data loss issue method 1
fix data loss issue method 1 Tracked-On: #6691 Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
This commit is contained in:
parent
4c18b36430
commit
3fa619f776
@ -13,42 +13,32 @@
|
|||||||
Delete VM
|
Delete VM
|
||||||
</b-button>
|
</b-button>
|
||||||
</div>
|
</div>
|
||||||
<b-tabs>
|
|
||||||
<b-tab title="Basic Parameters">
|
|
||||||
<p>
|
|
||||||
<text style="color: red">*</text>
|
|
||||||
are required fields
|
|
||||||
</p>
|
|
||||||
<VueForm
|
|
||||||
v-model="currentFormData"
|
|
||||||
:form-props="formProps"
|
|
||||||
:ui-schema="uiSchema"
|
|
||||||
:schema="currentFormSchema.BasicConfigType"
|
|
||||||
@change="dataChange"
|
|
||||||
>
|
|
||||||
<template>
|
|
||||||
|
|
||||||
</template>
|
<div class="abTabs">
|
||||||
</VueForm>
|
<div class="bTab" @click="this.currentFormMode='BasicConfigType'"
|
||||||
</b-tab>
|
:class="{Active:this.currentFormMode==='BasicConfigType'}">
|
||||||
<b-tab title="Advanced Parameters">
|
Basic Parameters
|
||||||
<p>
|
</div>
|
||||||
<text style="color: red">*</text>
|
<div class="aTab" @click="this.currentFormMode='AdvancedConfigType'"
|
||||||
are required fields
|
:class="{Active:this.currentFormMode==='AdvancedConfigType'}">
|
||||||
</p>
|
Advanced Parameters
|
||||||
<VueForm
|
</div>
|
||||||
v-model="currentFormData"
|
</div>
|
||||||
:form-props="formProps"
|
<div class="tabContent">
|
||||||
:ui-schema="uiSchema"
|
<div class="notice">
|
||||||
:schema="currentFormSchema.AdvancedConfigType"
|
<text style="color: red">*</text>
|
||||||
@change="dataChange"
|
are required fields
|
||||||
>
|
</div>
|
||||||
<template>
|
<VueForm
|
||||||
|
v-model="currentFormData"
|
||||||
</template>
|
:form-props="formProps"
|
||||||
</VueForm>
|
:ui-schema="uiSchema"
|
||||||
</b-tab>
|
:schema="currentFormSchema[currentFormMode]"
|
||||||
</b-tabs>
|
@change="dataChange"
|
||||||
|
>
|
||||||
|
<template></template>
|
||||||
|
</VueForm>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -63,6 +53,7 @@ import Network from "./ConfigForm/CustomWidget/Virtio/Network.vue";
|
|||||||
import Console from "./ConfigForm/CustomWidget/Virtio/Console.vue";
|
import Console from "./ConfigForm/CustomWidget/Virtio/Console.vue";
|
||||||
import Input from "./ConfigForm/CustomWidget/Virtio/Input.vue";
|
import Input from "./ConfigForm/CustomWidget/Virtio/Input.vue";
|
||||||
import CAT from "./ConfigForm/CustomWidget/CAT.vue";
|
import CAT from "./ConfigForm/CustomWidget/CAT.vue";
|
||||||
|
|
||||||
i18n.useLocal(localizeEn);
|
i18n.useLocal(localizeEn);
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -76,6 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
currentFormMode: 'BasicConfigType',
|
||||||
formProps: {
|
formProps: {
|
||||||
"inline": false,
|
"inline": false,
|
||||||
"inlineFooter": false,
|
"inlineFooter": false,
|
||||||
@ -144,7 +136,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
.nav-tabs .nav-link {
|
.nav-tabs .nav-link {
|
||||||
/*noinspection CssNoGenericFontName*/
|
/*noinspection CssNoGenericFontName*/
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
@ -202,4 +194,40 @@ export default {
|
|||||||
.n-popover {
|
.n-popover {
|
||||||
max-width: 60%;
|
max-width: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.abTabs {
|
||||||
|
display: flex;
|
||||||
|
gap: 3px;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
& .aTab, & .bTab {
|
||||||
|
cursor: pointer;
|
||||||
|
border: 1px solid #007B81;
|
||||||
|
border-bottom: none;
|
||||||
|
border-radius: 5px 5px 0 0;
|
||||||
|
background: #E1F2EF;
|
||||||
|
padding: 1rem;
|
||||||
|
color: #007B81;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
|
||||||
|
&.Active {
|
||||||
|
background: #007B81;
|
||||||
|
border: 1px solid #373A77;
|
||||||
|
border-bottom: none;
|
||||||
|
color: white;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.tabContent {
|
||||||
|
border: 1px solid purple;
|
||||||
|
padding: 1rem;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice{
|
||||||
|
padding: 1rem 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -70,6 +70,7 @@ def get_dynamic_scenario(board):
|
|||||||
current_form_type_schema_obj = form_schema['definitions'][f'{tab_type}{form_type}']
|
current_form_type_schema_obj = form_schema['definitions'][f'{tab_type}{form_type}']
|
||||||
for key in ['type', 'required', 'properties']:
|
for key in ['type', 'required', 'properties']:
|
||||||
if key == 'required' and key not in current_form_type_schema_obj:
|
if key == 'required' and key not in current_form_type_schema_obj:
|
||||||
|
form_schema[key] = []
|
||||||
continue
|
continue
|
||||||
form_schema[key] = current_form_type_schema_obj[key]
|
form_schema[key] = current_form_type_schema_obj[key]
|
||||||
form_schemas[tab_type][form_type] = form_schema
|
form_schemas[tab_type][form_type] = form_schema
|
||||||
|
Loading…
Reference in New Issue
Block a user