Skip to content

Commit 1c81843

Browse files
committed
Disable arch and ocp version fields
Signed-off-by: Elay Aharoni <elayaha@gmail.com>
1 parent 2aca314 commit 1c81843

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

libs/ui-lib/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const OcmClusterDetailsFormFields = ({
144144
) : (
145145
<OcmOpenShiftVersionSelect versions={versions} />
146146
)}
147-
{clusterExists ? (
147+
{clusterExists || isSingleClusterFeatureEnabled ? (
148148
<StaticTextField name="cpuArchitecture" label="CPU architecture" isRequired>
149149
{cpuArchitecture}
150150
</StaticTextField>

libs/ui-lib/lib/ocm/components/clusterWizard/ClusterDetailsForm.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
InfraEnv,
3232
ManagedDomain,
3333
} from '@openshift-assisted/types/assisted-installer-service';
34+
import { useFeature } from '../../hooks/use-feature';
3435

3536
type ClusterDetailsFormProps = {
3637
cluster?: Cluster;
@@ -67,6 +68,7 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
6768
const { search } = useLocation();
6869
const { isViewerMode } = useSelector(selectCurrentClusterPermissionsState);
6970
const { clearAlerts } = useAlerts();
71+
const isSingleClusterFeatureEnabled = useFeature('ASSISTED_INSTALLER_SINGLE_CLUSTER_FEATURE');
7072

7173
const handleSubmit = React.useCallback(
7274
async (values: OcmClusterDetailsValues) => {
@@ -175,7 +177,11 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
175177
<GridItem span={12} lg={10} xl={9} xl2={7}>
176178
<OcmClusterDetailsFormFields
177179
versions={ocpVersions}
178-
forceOpenshiftVersion={cluster?.openshiftVersion}
180+
forceOpenshiftVersion={
181+
isSingleClusterFeatureEnabled
182+
? ocpVersions[0].version
183+
: cluster?.openshiftVersion
184+
}
179185
isPullSecretSet={!!cluster?.pullSecretSet}
180186
defaultPullSecret={pullSecret}
181187
isOcm={isInOcm}

0 commit comments

Comments
 (0)