misc: configurator: report the errors on clicking save button
On clicking save button, current scenario configuration is validated and
errors should be prompted out if any.
BTW, fix unrecognized value in cpu affinity object.
Fixes: 5a3b38f778
("config-tools: add confirm message")
Tracked-On: #7469
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
This commit is contained in:
parent
7750a6c25b
commit
e4f11ca4c8
|
@ -358,7 +358,10 @@ export default {
|
|||
configurator.writeFile(this.WorkingFolder + 'scenario.xml', scenarioXMLData)
|
||||
.then(() => {
|
||||
step = 1
|
||||
configurator.pythonObject.validateScenario(this.board.content, scenarioXMLData)
|
||||
this.errors = configurator.pythonObject.validateScenario(this.board.content, scenarioXMLData)
|
||||
if (this.errors.length != 0) {
|
||||
throw "validation failed"
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
step = 2
|
||||
|
|
|
@ -114,7 +114,7 @@ export default {
|
|||
return `${this.rootFormData.name} vCPU ${index}`
|
||||
},
|
||||
addPCPU(index) {
|
||||
this.defaultVal.pcpu.splice(index + 1, 0, {pcpu_id: null, real_time_vcpu: false})
|
||||
this.defaultVal.pcpu.splice(index + 1, 0, {pcpu_id: null, real_time_vcpu: "n"})
|
||||
},
|
||||
removePCPU(index) {
|
||||
if (this.defaultVal.pcpu.length === 1) {
|
||||
|
@ -144,4 +144,4 @@ export default {
|
|||
background: #f9f9f9;
|
||||
padding: 5px 5px 3px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue