Manually revert "Fedora-services: add support for fedora env"
This reverts #2984 as Fedora service frontend is not being currently actively maintained.
This commit is contained in:
parent
969497e722
commit
0597541af2
14 changed files with 47 additions and 216 deletions
|
|
@ -23,7 +23,6 @@ import {
|
|||
} from '../../../../../store/imageBuilderApi';
|
||||
import { selectPackages } from '../../../../../store/wizardSlice';
|
||||
import { createAnalytics } from '../../../../../Utilities/analytics';
|
||||
import { useGetEnvironment } from '../../../../../Utilities/useGetEnvironment';
|
||||
|
||||
type CreateDropdownProps = {
|
||||
getBlueprintPayload: () => Promise<'' | CreateBlueprintRequest | undefined>;
|
||||
|
|
@ -52,12 +51,11 @@ export const CreateSaveAndBuildBtn = ({
|
|||
fixedCacheKey: 'createBlueprintKey',
|
||||
});
|
||||
const dispatch = useAppDispatch();
|
||||
const { isFedoraEnv } = useGetEnvironment();
|
||||
const onSaveAndBuild = async () => {
|
||||
const requestBody = await getBlueprintPayload();
|
||||
setIsOpen(false);
|
||||
|
||||
if (!process.env.IS_ON_PREMISE && !isFedoraEnv && requestBody) {
|
||||
if (!process.env.IS_ON_PREMISE && requestBody) {
|
||||
const analyticsData = createAnalytics(requestBody, packages, isBeta);
|
||||
analytics.track(`${AMPLITUDE_MODULE_NAME} - Blueprint Created`, {
|
||||
...analyticsData,
|
||||
|
|
@ -108,7 +106,6 @@ export const CreateSaveButton = ({
|
|||
})();
|
||||
}, [auth]);
|
||||
const packages = useAppSelector(selectPackages);
|
||||
const { isFedoraEnv } = useGetEnvironment();
|
||||
|
||||
const [createBlueprint, { isLoading }] = useCreateBlueprintMutation({
|
||||
fixedCacheKey: 'createBlueprintKey',
|
||||
|
|
@ -161,7 +158,7 @@ export const CreateSaveButton = ({
|
|||
const requestBody = await getBlueprintPayload();
|
||||
setIsOpen(false);
|
||||
|
||||
if (!process.env.IS_ON_PREMISE && !isFedoraEnv && requestBody) {
|
||||
if (!process.env.IS_ON_PREMISE && requestBody) {
|
||||
const analyticsData = createAnalytics(requestBody, packages, isBeta);
|
||||
analytics.track(`${AMPLITUDE_MODULE_NAME} - Blueprint Created`, {
|
||||
...analyticsData,
|
||||
|
|
@ -169,11 +166,13 @@ export const CreateSaveButton = ({
|
|||
account_id: userData?.identity.internal?.account_id || 'Not found',
|
||||
});
|
||||
}
|
||||
|
||||
const blueprint =
|
||||
requestBody &&
|
||||
(await createBlueprint({
|
||||
createBlueprintRequest: requestBody,
|
||||
}).unwrap());
|
||||
|
||||
if (blueprint) {
|
||||
dispatch(setBlueprintId(blueprint?.id));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import {
|
|||
useUpdateBlueprintMutation,
|
||||
} from '../../../../../store/backendApi';
|
||||
import { resolveRelPath } from '../../../../../Utilities/path';
|
||||
import { useGetEnvironment } from '../../../../../Utilities/useGetEnvironment';
|
||||
import { mapRequestFromState } from '../../../utilities/requestMapper';
|
||||
import { useIsBlueprintValid } from '../../../utilities/useValidation';
|
||||
|
||||
|
|
@ -35,7 +34,6 @@ const ReviewWizardFooter = () => {
|
|||
useUpdateBlueprintMutation({ fixedCacheKey: 'updateBlueprintKey' });
|
||||
const { auth } = useChrome();
|
||||
const { composeId } = useParams();
|
||||
const { isFedoraEnv } = useGetEnvironment();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const store = useStore();
|
||||
const onToggleClick = () => {
|
||||
|
|
@ -53,7 +51,7 @@ const ReviewWizardFooter = () => {
|
|||
}, [isUpdateSuccess, isCreateSuccess, resetCreate, resetUpdate, navigate]);
|
||||
|
||||
const getBlueprintPayload = async () => {
|
||||
if (!process.env.IS_ON_PREMISE && !isFedoraEnv) {
|
||||
if (!process.env.IS_ON_PREMISE) {
|
||||
const userData = await auth?.getUser();
|
||||
const orgId = userData?.identity?.internal?.org_id;
|
||||
const requestBody = orgId && mapRequestFromState(store, orgId);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ import {
|
|||
selectUsers,
|
||||
selectKernel,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
|
||||
|
||||
const Review = () => {
|
||||
const { goToStepById } = useWizardContext();
|
||||
|
|
@ -187,7 +186,6 @@ const Review = () => {
|
|||
);
|
||||
};
|
||||
|
||||
const { isFedoraEnv } = useGetEnvironment();
|
||||
return (
|
||||
<>
|
||||
<ExpandableSection
|
||||
|
|
@ -359,23 +357,21 @@ const Review = () => {
|
|||
>
|
||||
<FSCList />
|
||||
</ExpandableSection>
|
||||
{!isFedoraEnv && (
|
||||
<ExpandableSection
|
||||
toggleContent={composeExpandable(
|
||||
'Content',
|
||||
'revisit-custom-repositories',
|
||||
'wizard-custom-repositories'
|
||||
)}
|
||||
onToggle={(_event, isExpandedContent) =>
|
||||
onToggleContent(isExpandedContent)
|
||||
}
|
||||
isExpanded={isExpandedContent}
|
||||
isIndented
|
||||
data-testid="content-expandable"
|
||||
>
|
||||
<ContentList />
|
||||
</ExpandableSection>
|
||||
)}
|
||||
<ExpandableSection
|
||||
toggleContent={composeExpandable(
|
||||
'Content',
|
||||
'revisit-custom-repositories',
|
||||
'wizard-custom-repositories'
|
||||
)}
|
||||
onToggle={(_event, isExpandedContent) =>
|
||||
onToggleContent(isExpandedContent)
|
||||
}
|
||||
isExpanded={isExpandedContent}
|
||||
isIndented
|
||||
data-testid="content-expandable"
|
||||
>
|
||||
<ContentList />
|
||||
</ExpandableSection>
|
||||
{users.length > 0 && (
|
||||
<ExpandableSection
|
||||
toggleContent={composeExpandable(
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import {
|
|||
import { FSReviewTable } from './ReviewStepTables';
|
||||
|
||||
import {
|
||||
FEDORA_RELEASES,
|
||||
ON_PREM_RELEASES,
|
||||
RELEASES,
|
||||
RHEL_10,
|
||||
|
|
@ -81,7 +80,6 @@ import {
|
|||
selectRedHatRepositories,
|
||||
} from '../../../../store/wizardSlice';
|
||||
import { toMonthAndYear, yyyyMMddFormat } from '../../../../Utilities/time';
|
||||
import { useGetEnvironment } from '../../../../Utilities/useGetEnvironment';
|
||||
import {
|
||||
getConversionFactor,
|
||||
MinimumSizePopover,
|
||||
|
|
@ -106,12 +104,8 @@ const ExpirationWarning = () => {
|
|||
export const ImageOutputList = () => {
|
||||
const distribution = useAppSelector(selectDistribution);
|
||||
const arch = useAppSelector(selectArchitecture);
|
||||
const { isFedoraEnv } = useGetEnvironment();
|
||||
const releases = isFedoraEnv
|
||||
? FEDORA_RELEASES
|
||||
: process.env.IS_ON_PREMISE
|
||||
? ON_PREM_RELEASES
|
||||
: RELEASES;
|
||||
const releases = process.env.IS_ON_PREMISE ? ON_PREM_RELEASES : RELEASES;
|
||||
|
||||
return (
|
||||
<Content>
|
||||
{(distribution === RHEL_8 || distribution === RHEL_9) && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue