mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-05 02:40:37 +00:00
config-tools: add validation to vuart widget
vuart widget don't have empty line check for required fields. Added in this patch. Tracked-On: #7506 Signed-off-by: Wu Zhou <wu.zhou@intel.com>
This commit is contained in:
@@ -9,7 +9,10 @@
|
|||||||
<label>VM name: </label>
|
<label>VM name: </label>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col md="4">
|
<b-col md="4">
|
||||||
<b-form-select v-model="VUARTConn.endpoint[0].vm_name" :options="vmNames"></b-form-select>
|
<b-form-select :state="validation(VUARTConn.endpoint[0].vm_name)" v-model="VUARTConn.endpoint[0].vm_name" :options="vmNames"></b-form-select>
|
||||||
|
<b-form-invalid-feedback>
|
||||||
|
must have value
|
||||||
|
</b-form-invalid-feedback>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
|
||||||
@@ -24,7 +27,10 @@
|
|||||||
<label>VM name: </label>
|
<label>VM name: </label>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col md="4">
|
<b-col md="4">
|
||||||
<b-form-select v-model="VUARTConn.endpoint[1].vm_name" :options="vmNames"></b-form-select>
|
<b-form-select :state="validation(VUARTConn.endpoint[1].vm_name)" v-model="VUARTConn.endpoint[1].vm_name" :options="vmNames"></b-form-select>
|
||||||
|
<b-form-invalid-feedback>
|
||||||
|
must have value
|
||||||
|
</b-form-invalid-feedback>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
|
||||||
@@ -33,7 +39,10 @@
|
|||||||
<label>Type: </label>
|
<label>Type: </label>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col md="4">
|
<b-col md="4">
|
||||||
<b-form-select v-model="VUARTConn.type" :options="VuartType"></b-form-select>
|
<b-form-select :state="validation(VUARTConn.type)" v-model="VUARTConn.type" :options="VuartType"></b-form-select>
|
||||||
|
<b-form-invalid-feedback>
|
||||||
|
must have value
|
||||||
|
</b-form-invalid-feedback>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
|
|
||||||
@@ -143,6 +152,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
validation(value) {
|
||||||
|
return value.length != 0;
|
||||||
|
},
|
||||||
removeVUARTConnection(index) {
|
removeVUARTConnection(index) {
|
||||||
this.defaultVal.splice(index, 1);
|
this.defaultVal.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user