@@ -25,6 +25,7 @@ import {
25
25
useNewFeatureSupportLevel ,
26
26
} from '../../../../common/components/newFeatureSupportLevels' ;
27
27
import NewFeatureSupportLevelBadge from '../../../../common/components/newFeatureSupportLevels/NewFeatureSupportLevelBadge' ;
28
+ import { useFeature } from '../../../hooks/use-feature' ;
28
29
29
30
const INPUT_NAME = 'platform' ;
30
31
const fieldId = getFieldId ( INPUT_NAME , 'input' ) ;
@@ -47,10 +48,13 @@ const getDisabledReasonForExternalPlatform = (
47
48
isSNO : boolean ,
48
49
newFeatureSupportLevelContext : NewFeatureSupportLevelData ,
49
50
platform : PlatformType ,
51
+ isDisconnected : boolean ,
50
52
featureSupportLevelData ?: NewFeatureSupportLevelMap | null ,
51
53
cpuArchitecture ?: SupportedCpuArchitecture ,
52
54
) : string | undefined => {
53
- if ( isSNO && ( platform === 'nutanix' || platform === 'vsphere' ) ) {
55
+ if ( isDisconnected && platform === 'nutanix' ) {
56
+ return `Platform integration is not supported for disconnected clusters.` ;
57
+ } else if ( isSNO && ( platform === 'nutanix' || platform === 'vsphere' ) ) {
54
58
return `${ ExternalPlatformLabels [ platform ] } integration is not supported for Single-Node OpenShift.` ;
55
59
} else if (
56
60
isSNO &&
@@ -69,6 +73,7 @@ const getDisabledReasonForExternalPlatform = (
69
73
const getExternalPlatformTypes = (
70
74
isSNO : boolean ,
71
75
newFeatureSupportLevelContext : NewFeatureSupportLevelData ,
76
+ isDisconnected : boolean ,
72
77
featureSupportLevelData ?: NewFeatureSupportLevelMap | null ,
73
78
cpuArchitecture ?: SupportedCpuArchitecture ,
74
79
) : Partial < { [ key in PlatformType ] : ExternalPlatformInfo } > => {
@@ -84,6 +89,7 @@ const getExternalPlatformTypes = (
84
89
isSNO ,
85
90
newFeatureSupportLevelContext ,
86
91
platform ,
92
+ isDisconnected ,
87
93
featureSupportLevelData ?? undefined ,
88
94
cpuArchitecture ,
89
95
) ,
@@ -105,9 +111,15 @@ export const areAllExternalPlatformIntegrationDisabled = (
105
111
. every ( ( info ) => info . disabledReason !== undefined ) ;
106
112
} ;
107
113
108
- const getReasonForDropdownDisabled = ( isSNO : boolean , labelCpuArch : string ) : string => {
109
- if ( ! isSNO ) {
114
+ const getReasonForDropdownDisabled = (
115
+ isSNO : boolean ,
116
+ labelCpuArch : string ,
117
+ isDisconnected : boolean ,
118
+ ) : string => {
119
+ if ( ! isSNO && ! isDisconnected ) {
110
120
return `Platform integration is not supported when ${ labelCpuArch } is selected` ;
121
+ } else if ( isDisconnected ) {
122
+ return `Platform integration is not supported for disconnected clusters` ;
111
123
} else {
112
124
return `Platform integration is not supported for SNO clusters` ;
113
125
}
@@ -124,10 +136,12 @@ export const ExternalPlatformDropdown = ({
124
136
const [ externalPlatformTypes , setExternalPlatformTypes ] = React . useState <
125
137
Partial < { [ key in PlatformType ] : ExternalPlatformInfo } >
126
138
> ( { } ) ;
139
+ const isSingleClusterFeatureEnabled = useFeature ( 'ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE' ) ;
127
140
128
141
const tooltipDropdownDisabled = getReasonForDropdownDisabled (
129
142
isSNO ,
130
143
cpuArchitecture ? architectureData [ cpuArchitecture ] . label : '' ,
144
+ isSingleClusterFeatureEnabled ,
131
145
) ;
132
146
133
147
const handleClick = ( event : MouseEvent < HTMLButtonElement > , href : string ) => {
@@ -140,6 +154,7 @@ export const ExternalPlatformDropdown = ({
140
154
const updatedExternalPlatformTypes = getExternalPlatformTypes (
141
155
isSNO ,
142
156
newFeatureSupportLevelContext ,
157
+ isSingleClusterFeatureEnabled ,
143
158
featureSupportLevelData ,
144
159
cpuArchitecture ,
145
160
) ;
0 commit comments