API: Add programatically generated Image Builder API slice definitions
These definitions were generated using the RTKQ code generation tool and will replace the existing definitions.
This commit is contained in:
parent
87b97b830f
commit
1894a9dcb2
10 changed files with 329 additions and 31 deletions
|
|
@ -29,8 +29,8 @@ import {
|
|||
import './CreateImageWizard.scss';
|
||||
import api from '../../api';
|
||||
import { UNIT_GIB, UNIT_KIB, UNIT_MIB } from '../../constants';
|
||||
import { useGetArchitecturesByDistributionQuery } from '../../store/apiSlice';
|
||||
import { composeAdded } from '../../store/composesSlice';
|
||||
import { useGetArchitecturesQuery } from '../../store/imageBuilderApi';
|
||||
import isRhel from '../../Utilities/isRhel';
|
||||
import { resolveRelPath } from '../../Utilities/path';
|
||||
import { useGetEnvironment } from '../../Utilities/useGetEnvironment';
|
||||
|
|
@ -502,8 +502,8 @@ const CreateImageWizard = () => {
|
|||
const composeRequest = compose?.request;
|
||||
|
||||
// TODO: This causes an annoying re-render when using Recreate image
|
||||
const { data: distroInfo } = useGetArchitecturesByDistributionQuery(
|
||||
composeRequest?.distribution,
|
||||
const { data: distroInfo } = useGetArchitecturesQuery(
|
||||
{ distribution: composeRequest?.distribution },
|
||||
{
|
||||
// distroInfo is only needed when recreating an image, skip otherwise
|
||||
skip: composeId ? false : true,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import WizardContext from '@data-driven-forms/react-form-renderer/wizard-context
|
|||
import { Button } from '@patternfly/react-core';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { usePrefetch } from '../../../store/apiSlice';
|
||||
import { imageBuilderApi } from '../../../store/imageBuilderApi';
|
||||
|
||||
// FileSystemconfigButtons are defined separately to display errors inside of the button footer
|
||||
const FileSystemConfigButtons = ({ handleNext, handlePrev, nextStep }) => {
|
||||
|
|
@ -15,7 +15,7 @@ const FileSystemConfigButtons = ({ handleNext, handlePrev, nextStep }) => {
|
|||
getState()?.errors?.['file-system-configuration'] ? true : false
|
||||
);
|
||||
const [nextHasBeenClicked, setNextHasBeenClicked] = useState(false);
|
||||
const prefetchArchitectures = usePrefetch('getArchitecturesByDistribution');
|
||||
const prefetchArchitectures = imageBuilderApi.usePrefetch('getArchitectures');
|
||||
|
||||
useEffect(() => {
|
||||
const errors = getState()?.errors?.['file-system-configuration'];
|
||||
|
|
@ -38,7 +38,7 @@ const FileSystemConfigButtons = ({ handleNext, handlePrev, nextStep }) => {
|
|||
|
||||
const handleMouseEnter = () => {
|
||||
const distribution = getState()?.values?.release;
|
||||
prefetchArchitectures(distribution);
|
||||
prefetchArchitectures({ distribution });
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import {
|
|||
import PropTypes from 'prop-types';
|
||||
|
||||
import api from '../../../api';
|
||||
import { useGetArchitecturesByDistributionQuery } from '../../../store/apiSlice';
|
||||
import { useGetArchitecturesQuery } from '../../../store/imageBuilderApi';
|
||||
|
||||
const ExactMatch = ({
|
||||
pkgList,
|
||||
|
|
@ -61,7 +61,7 @@ export const RedHatPackages = ({ defaultArch }) => {
|
|||
const { getState } = useFormApi();
|
||||
const distribution = getState()?.values?.release;
|
||||
const { data: distributionInformation, isSuccess: isSuccessDistroInfo } =
|
||||
useGetArchitecturesByDistributionQuery(distribution);
|
||||
useGetArchitecturesQuery({ distribution });
|
||||
|
||||
const getAllPackages = async (packagesSearchName) => {
|
||||
// if the env is stage beta then use content-sources api
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue