1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-04-01 06:50:25 +03:00

F #6211: fix Datastore creation ignores cluster selection (#2721)

This commit is contained in:
Jorge Miguel Lobo Escalona 2023-09-11 18:33:32 +02:00 committed by GitHub
parent 9b9f9195a0
commit 4c1ab6efee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,10 +38,11 @@ function CreateDatastore() {
const [allocate] = useAllocateDatastoreMutation()
const { enqueueSuccess } = useGeneralApi()
const onSubmit = async ({ template }) => {
const onSubmit = async ({ template, cluster }) => {
try {
const newTemplateId = await allocate({
template: jsonToXml(template),
cluster,
}).unwrap()
history.push(PATH.STORAGE.DATASTORES.LIST)
enqueueSuccess(`Datastore created - #${newTemplateId}`)