|
|
@ -20,14 +20,14 @@ const INPUT_CELL_ID_PREFIX_AH = `${INPUT_ID_PREFIX_AN_HOST}-cell`; |
|
|
|
|
|
|
|
|
|
|
|
const GRID_SPACING = '1em'; |
|
|
|
const GRID_SPACING = '1em'; |
|
|
|
|
|
|
|
|
|
|
|
const buildInputIdAHFencePort = (fenceId: string): string => |
|
|
|
const buildInputIdAHFencePort = (hostId: string, fenceId: string): string => |
|
|
|
`${INPUT_ID_PREFIX_AN_HOST}-${fenceId}-port`; |
|
|
|
`${INPUT_ID_PREFIX_AN_HOST}-${hostId}-${fenceId}-port`; |
|
|
|
|
|
|
|
|
|
|
|
const buildInputIdAHNetworkIp = (networkId: string): string => |
|
|
|
const buildInputIdAHNetworkIp = (hostId: string, networkId: string): string => |
|
|
|
`${INPUT_ID_PREFIX_AN_HOST}-${networkId}-ip`; |
|
|
|
`${INPUT_ID_PREFIX_AN_HOST}-${hostId}-${networkId}-ip`; |
|
|
|
|
|
|
|
|
|
|
|
const buildInputIdAHUpsPowerHost = (upsId: string): string => |
|
|
|
const buildInputIdAHUpsPowerHost = (hostId: string, upsId: string): string => |
|
|
|
`${INPUT_ID_PREFIX_AN_HOST}-${upsId}-power-host`; |
|
|
|
`${INPUT_ID_PREFIX_AN_HOST}-${hostId}-${upsId}-power-host`; |
|
|
|
|
|
|
|
|
|
|
|
const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
formUtils: { |
|
|
|
formUtils: { |
|
|
@ -36,6 +36,7 @@ const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
msgSetters, |
|
|
|
msgSetters, |
|
|
|
setMsgSetter, |
|
|
|
setMsgSetter, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
hostId, |
|
|
|
hostLabel, |
|
|
|
hostLabel, |
|
|
|
previous: { |
|
|
|
previous: { |
|
|
|
fences: fenceList = {}, |
|
|
|
fences: fenceList = {}, |
|
|
@ -72,7 +73,7 @@ const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
(previous, [fenceId, { fenceName, fencePort }]) => { |
|
|
|
(previous, [fenceId, { fenceName, fencePort }]) => { |
|
|
|
const cellId = `${INPUT_CELL_ID_PREFIX_AH}-${fenceId}-port`; |
|
|
|
const cellId = `${INPUT_CELL_ID_PREFIX_AH}-${fenceId}-port`; |
|
|
|
|
|
|
|
|
|
|
|
const inputId = buildInputIdAHFencePort(fenceId); |
|
|
|
const inputId = buildInputIdAHFencePort(hostId, fenceId); |
|
|
|
const inputLabel = `Port on ${fenceName}`; |
|
|
|
const inputLabel = `Port on ${fenceName}`; |
|
|
|
|
|
|
|
|
|
|
|
setMsgSetter(inputId); |
|
|
|
setMsgSetter(inputId); |
|
|
@ -111,6 +112,7 @@ const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
buildFinishInputTestBatchFunction, |
|
|
|
buildFinishInputTestBatchFunction, |
|
|
|
buildInputFirstRenderFunction, |
|
|
|
buildInputFirstRenderFunction, |
|
|
|
fenceListEntries, |
|
|
|
fenceListEntries, |
|
|
|
|
|
|
|
hostId, |
|
|
|
msgSetters, |
|
|
|
msgSetters, |
|
|
|
setMsgSetter, |
|
|
|
setMsgSetter, |
|
|
|
], |
|
|
|
], |
|
|
@ -122,7 +124,7 @@ const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
(previous, [networkId, { networkIp, networkNumber, networkType }]) => { |
|
|
|
(previous, [networkId, { networkIp, networkNumber, networkType }]) => { |
|
|
|
const cellId = `${INPUT_CELL_ID_PREFIX_AH}-${networkId}-ip`; |
|
|
|
const cellId = `${INPUT_CELL_ID_PREFIX_AH}-${networkId}-ip`; |
|
|
|
|
|
|
|
|
|
|
|
const inputId = buildInputIdAHNetworkIp(networkIp); |
|
|
|
const inputId = buildInputIdAHNetworkIp(hostId, networkIp); |
|
|
|
const inputLabel = `${NETWORK_TYPES[networkType]} ${networkNumber}`; |
|
|
|
const inputLabel = `${NETWORK_TYPES[networkType]} ${networkNumber}`; |
|
|
|
|
|
|
|
|
|
|
|
setMsgSetter(inputId); |
|
|
|
setMsgSetter(inputId); |
|
|
@ -159,6 +161,7 @@ const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
), |
|
|
|
), |
|
|
|
[ |
|
|
|
[ |
|
|
|
networkListEntries, |
|
|
|
networkListEntries, |
|
|
|
|
|
|
|
hostId, |
|
|
|
setMsgSetter, |
|
|
|
setMsgSetter, |
|
|
|
buildFinishInputTestBatchFunction, |
|
|
|
buildFinishInputTestBatchFunction, |
|
|
|
buildInputFirstRenderFunction, |
|
|
|
buildInputFirstRenderFunction, |
|
|
@ -172,7 +175,7 @@ const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
(previous, [upsId, { isUsed, upsName }]) => { |
|
|
|
(previous, [upsId, { isUsed, upsName }]) => { |
|
|
|
const cellId = `${INPUT_CELL_ID_PREFIX_AH}-${upsId}-power-host`; |
|
|
|
const cellId = `${INPUT_CELL_ID_PREFIX_AH}-${upsId}-power-host`; |
|
|
|
|
|
|
|
|
|
|
|
const inputId = buildInputIdAHUpsPowerHost(upsId); |
|
|
|
const inputId = buildInputIdAHUpsPowerHost(hostId, upsId); |
|
|
|
const inputLabel = `Uses ${upsName}`; |
|
|
|
const inputLabel = `Uses ${upsName}`; |
|
|
|
|
|
|
|
|
|
|
|
previous[cellId] = { |
|
|
|
previous[cellId] = { |
|
|
@ -195,7 +198,7 @@ const AnHostInputGroup = <M extends MapToInputTestID>({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{}, |
|
|
|
{}, |
|
|
|
), |
|
|
|
), |
|
|
|
[upsListEntries], |
|
|
|
[hostId, upsListEntries], |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|