@@ -30,6 +30,7 @@ import {
30
30
import React from 'react'
31
31
import { FieldName } from './types'
32
32
import { getFieldLabels } from './hypershift/utils'
33
+ import { getFirstAgentServiceConfig } from '../../../../../InfraEnvironments/InfraEnvironmentsPage'
33
34
34
35
type FormControl = {
35
36
active : ClusterDetailsValues & {
@@ -120,7 +121,7 @@ export const getExtensionAfter = ({
120
121
} )
121
122
122
123
const DetailsForm : React . FC < DetailsFormProps > = ( { control, handleChange, controlProps } ) => {
123
- const { clusterDeploymentsState, clusterImageSetsState } = useSharedAtoms ( )
124
+ const { clusterDeploymentsState, clusterImageSetsState, agentServiceConfigsState } = useSharedAtoms ( )
124
125
const clusterDeployments = useRecoilValue ( clusterDeploymentsState )
125
126
const clusterImageSets = useRecoilValue ( clusterImageSetsState )
126
127
const formRef = useRef < FormikProps < any > > ( null )
@@ -215,6 +216,8 @@ const DetailsForm: React.FC<DetailsFormProps> = ({ control, handleChange, contro
215
216
} , [ control ] )
216
217
217
218
const clusterImages = useClusterImages ( )
219
+ const agentServiceConfigs = useRecoilValue ( agentServiceConfigsState )
220
+ const agentServiceConfig = getFirstAgentServiceConfig ( agentServiceConfigs )
218
221
219
222
const usedClusterNames = useMemo ( ( ) => clusterDeployments . map ( ( cd ) => cd . metadata . name || '' ) , [ ] )
220
223
@@ -285,6 +288,7 @@ const DetailsForm: React.FC<DetailsFormProps> = ({ control, handleChange, contro
285
288
usedClusterNames = { usedClusterNames }
286
289
extensionAfter = { extensionAfter }
287
290
isNutanix = { control . additionalProps ?. isNutanix }
291
+ osImages = { agentServiceConfig ?. spec . osImages }
288
292
/>
289
293
</ ACMFeatureSupportLevelProvider >
290
294
</ FeatureGateContextProvider >
0 commit comments