Prepare for Provisioning list endpoint nesting
This commit is contained in:
parent
fffdb27b70
commit
847ba2371d
5 changed files with 21 additions and 6 deletions
|
|
@ -13,6 +13,7 @@ import {
|
|||
} from '@patternfly/react-core';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { extractProvisioningList } from '../../../store/helpers';
|
||||
import {
|
||||
useGetSourceListQuery,
|
||||
useGetSourceUploadInfoQuery,
|
||||
|
|
@ -32,12 +33,13 @@ export const AWSSourcesSelect = ({
|
|||
);
|
||||
|
||||
const {
|
||||
data: sources,
|
||||
data: rawSources,
|
||||
isFetching,
|
||||
isSuccess,
|
||||
isError,
|
||||
refetch,
|
||||
} = useGetSourceListQuery({ provider: 'aws' });
|
||||
const sources = extractProvisioningList(rawSources);
|
||||
|
||||
const {
|
||||
data: sourceDetails,
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import {
|
|||
} from '@patternfly/react-core';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { extractProvisioningList } from '../../../store/helpers';
|
||||
import {
|
||||
useGetSourceListQuery,
|
||||
useGetSourceUploadInfoQuery,
|
||||
|
|
@ -25,12 +26,13 @@ const AzureSourcesSelect = ({ label, isRequired, className, ...props }) => {
|
|||
const selectedSourceId = input.value;
|
||||
|
||||
const {
|
||||
data: sources,
|
||||
data: rawSources,
|
||||
isFetching,
|
||||
isSuccess,
|
||||
isError,
|
||||
refetch,
|
||||
} = useGetSourceListQuery({ provider: 'azure' });
|
||||
const sources = extractProvisioningList(rawSources);
|
||||
|
||||
const {
|
||||
data: sourceDetails,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import {
|
|||
} from './ReviewStepTables';
|
||||
|
||||
import { RELEASES, UNIT_GIB } from '../../../constants';
|
||||
import { extractProvisioningList } from '../../../store/helpers';
|
||||
import { useGetSourceListQuery } from '../../../store/provisioningApi';
|
||||
import { useShowActivationKeyQuery } from '../../../store/rhsmApi';
|
||||
import { useGetEnvironment } from '../../../Utilities/useGetEnvironment';
|
||||
|
|
@ -64,9 +65,10 @@ export const ImageOutputList = () => {
|
|||
};
|
||||
|
||||
export const TargetEnvAWSList = () => {
|
||||
const { data: awsSources, isSuccess } = useGetSourceListQuery({
|
||||
const { data: rawAWSSources, isSuccess } = useGetSourceListQuery({
|
||||
provider: 'aws',
|
||||
});
|
||||
const awsSources = extractProvisioningList(rawAWSSources);
|
||||
const { isBeta } = useGetEnvironment();
|
||||
|
||||
const { getState } = useFormApi();
|
||||
|
|
@ -170,8 +172,9 @@ export const TargetEnvGCPList = () => {
|
|||
|
||||
export const TargetEnvAzureList = () => {
|
||||
const { getState } = useFormApi();
|
||||
const { data: azureSources, isSuccess: isSuccessAzureSources } =
|
||||
const { data: rawAzureSources, isSuccess: isSuccessAzureSources } =
|
||||
useGetSourceListQuery({ provider: 'azure' });
|
||||
const azureSources = extractProvisioningList(rawAzureSources);
|
||||
return (
|
||||
<TextContent>
|
||||
<Text component={TextVariants.h3}>Microsoft Azure</Text>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue