fix(xo-web/New network): only hide bond-PIFs when creating a bonded network (#7151)

Fixes #7150
See https://xcp-ng.org/forum/topic/7918
Introduced by dbdc5f3e3b
This commit is contained in:
Pierre Donias
2023-11-03 11:22:10 +01:00
committed by GitHub
parent 89d8adc6c6
commit db99a22244

View File

@@ -154,9 +154,9 @@ const NewNetwork = decorate([
host =>
host.$pool === pool.id || networks.some(({ pool }) => pool !== undefined && pool.id === host.$pool),
pifPredicate:
(_, { pool }) =>
({ bonded }, { pool }) =>
pif =>
!pif.isBondSlave && !pif.isBondMaster && pif.vlan === -1 && pif.$host === (pool && pool.master),
!pif.isBondSlave && !(bonded && pif.isBondMaster) && pif.vlan === -1 && pif.$host === (pool && pool.master),
pifPredicateSdnController:
(_, { pool }) =>
pif =>