1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B OpenNebula/one#6744: Fix host requirements expression (#3257)

Signed-off-by: Victor Hansson <vhansson@opennebula.io>
(cherry picked from commit c4d727c79cd5fa753a0930a7577fb55f3e349acf)
This commit is contained in:
vichansson 2024-10-09 12:02:06 +03:00 committed by Tino Vázquez
parent 527d1edb78
commit f15665995d

View File

@ -69,6 +69,9 @@ const HOST_REQ_FIELD = (isUpdate, modifiedFields, instantiate) => ({
watcher: (dependencies, { formContext }) => {
const [hypervisor, clusterHostTable, clusterHostType] = dependencies
if (!hypervisor) {
return
}
const tableType = clusterHostType?.includes(T.Cluster) ? 'CLUSTER' : 'HOST'
const regexPattern = new RegExp(`\\b${tableType}_ID\\s*=\\s*(\\d+)`)