Skip to content

Commit

Permalink
fix rebase again
Browse files Browse the repository at this point in the history
  • Loading branch information
mgold1234 committed Oct 7, 2024
1 parent 99953f9 commit 668ec05
Show file tree
Hide file tree
Showing 7 changed files with 1,154 additions and 1,285 deletions.
2,397 changes: 1,143 additions & 1,254 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions src/Components/CreateImageWizard/CreateImageWizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
PageSection,
} from '@patternfly/react-core';
import { WizardStepType } from '@patternfly/react-core/dist/esm/components/Wizard';
import { useGetFeatureFlag } from 'getFeatureFlag';
import { resolveRelPath } from 'pathRes';
import { useNavigate, useSearchParams } from 'react-router-dom';

import DetailsStep from './steps/Details';
Expand Down Expand Up @@ -62,9 +64,7 @@ import {
selectImageTypes,
addImageType,
} from '../../store/wizardSlice';
import { resolveRelPath } from 'pathRes';
import { ImageBuilderHeader } from '../sharedComponents/ImageBuilderHeader';
import { useGetFeatureFlag } from 'getFeatureFlag';

type CustomWizardFooterPropType = {
disableBack?: boolean;
Expand Down Expand Up @@ -125,7 +125,6 @@ type CreateImageWizardProps = {
};

const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {
debugger
const navigate = useNavigate();
const dispatch = useAppDispatch();
const [searchParams] = useSearchParams();
Expand All @@ -150,16 +149,12 @@ const CreateImageWizard = ({ isEdit }: CreateImageWizardProps) => {

// =========================TO REMOVE=======================

<<<<<<< HEAD
// Feature flags
const isFirstBootEnabled = useFlag('image-builder.firstboot.enabled');
const complianceEnabled = useFlag('image-builder.compliance.enabled');

=======
const complianceEnabled = useGetFeatureFlag(
'image-builder.compliance.enabled'
);
const isFirstBootEnabled = useGetFeatureFlag(
'image-builder.firstboot.enabled'
);
>>>>>>> 7fa8aa83 (fix relevant component to be able to support onPrem environment.)
// IMPORTANT: Ensure the wizard starts with a fresh initial state
useEffect(() => {
dispatch(initializeWizard());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
} from '../../../../store/wizardSlice';

const TargetEnvironment = () => {
debugger
const arch = useAppSelector(selectArchitecture);
const environments = useAppSelector(selectImageTypes);
const distribution = useAppSelector(selectDistribution);
Expand Down
4 changes: 1 addition & 3 deletions src/Components/LandingPage/LandingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
ToolbarContent,
} from '@patternfly/react-core';
import { ExternalLinkAltIcon, HelpIcon } from '@patternfly/react-icons';
import { useGetFeatureFlag } from 'getFeatureFlag';
import { Outlet, useLocation, useNavigate } from 'react-router-dom';

import './LandingPage.scss';
Expand All @@ -27,9 +28,6 @@ import { NewAlert } from './NewAlert';
import { MANAGING_WITH_DNF_URL, OSTREE_URL } from '../../constants';
import { manageEdgeImagesUrlName } from '../../Utilities/edge';
import { resolveRelPath } from '../../Utilities/path';

import { useGetFeatureFlag } from 'getFeatureFlag';

import BlueprintsSidebar from '../Blueprints/BlueprintsSideBar';
import EdgeImagesTable from '../edge/ImagesTable';
import ImagesTable from '../ImagesTable/ImagesTable';
Expand Down
15 changes: 1 addition & 14 deletions src/Components/sharedComponents/ImageBuilderHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
PageHeader,
PageHeaderTitle,
} from '@redhat-cloud-services/frontend-components';
import { useGetFeatureFlag } from 'getFeatureFlag';
import { resolveRelPath } from 'pathRes';
import { useNavigate } from 'react-router-dom';

Expand All @@ -25,16 +26,10 @@ import {
CREATING_IMAGES_WITH_IB_SERVICE_URL,
OSBUILD_SERVICE_ARCHITECTURE_URL,
} from '../../constants';
<<<<<<< HEAD
import { useAppSelector } from '../../store/hooks';
import { imageBuilderApi } from '../../store/imageBuilderApi';
import { selectDistribution } from '../../store/wizardSlice';
import { resolveRelPath } from '../../Utilities/path';
=======
>>>>>>> 7fa8aa83 (fix relevant component to be able to support onPrem environment.)
import './ImageBuilderHeader.scss';
import { useGetFeatureFlag } from 'getFeatureFlag';

import { ImportBlueprintModal } from '../Blueprints/ImportBlueprintModal';

type ImageBuilderHeaderPropTypes = {
Expand Down Expand Up @@ -102,18 +97,10 @@ export const ImageBuilderHeader = ({
inWizard,
}: ImageBuilderHeaderPropTypes) => {
const navigate = useNavigate();
<<<<<<< HEAD

const distribution = useAppSelector(selectDistribution);
const prefetchTargets = imageBuilderApi.usePrefetch('getArchitectures');

const importExportFlag = useFlagWithEphemDefault(
'image-builder.import.enabled'
);
=======
const importExportFlag = useGetFeatureFlag('image-builder.import.enabled');

>>>>>>> 7fa8aa83 (fix relevant component to be able to support onPrem environment.)
const [showImportModal, setShowImportModal] = useState(false);
const isOnBlueprintsTab = activeTab === 0;
return (
Expand Down
3 changes: 2 additions & 1 deletion src/Utilities/useGetEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export const useGetFeatureFlag = (flagName: string) => {
flagName === 'edgeParity.image-list' ||
flagName === 'image-builder.snapshots.enabled' ||
flagName === 'image-builder.firstboot.enabled' ||
flagName === 'image-builder.wsl.enabled'
flagName === 'image-builder.wsl.enabled' ||
flagName === 'image-builder.compliance.enabled'
) {
// eslint-disable-next-line react-hooks/rules-of-hooks
return useFlag(flagName);
Expand Down
4 changes: 2 additions & 2 deletions src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { combineReducers, configureStore } from '@reduxjs/toolkit';
import promiseMiddleware from 'redux-promise-middleware';

import { blueprintsSlice } from './BlueprintSlice';
import { complianceApi } from './complianceApi';
import { blueprintsReducer } from './cockpitApi';
import { complianceApi } from './complianceApi';
import { contentSourcesApi } from './contentSourcesApi';
import { edgeApi } from './edgeApi';
import { imageBuilderApi } from './enhancedImageBuilderApi';
Expand Down Expand Up @@ -123,7 +123,7 @@ export const onPremMiddleware = (getDefaultMiddleware: Function) =>
promiseMiddleware,
contentSourcesApi.middleware,
imageBuilderApi.middleware,
rhsmApi.middleware,
rhsmApi.middleware,
blueprintsReducer.middleware
);

Expand Down

0 comments on commit 668ec05

Please sign in to comment.