diff --git a/src/Components/RegionsSelect/index.js b/src/Components/RegionsSelect/index.js index cee4672f..c528bad7 100644 --- a/src/Components/RegionsSelect/index.js +++ b/src/Components/RegionsSelect/index.js @@ -3,7 +3,7 @@ import React from 'react'; import { Alert, Select, SelectOption, Spinner } from '@patternfly/react-core'; import { useQuery, useQueries } from 'react-query'; -import { AWS_PROVIDER, AZURE_PROVIDER, GCP_PROVIDER } from '../../constants'; +import { AWS_PROVIDER, AZURE_PROVIDER, GCP_PROVIDER, MULTIPLE_REGION_SUPPORT } from '../../constants'; import { IMAGE_REGIONS_KEY } from '../../API/queryKeys'; import { fetchImageClones, fetchImageCloneStatus } from '../../API'; import { defaultRegionByProvider } from '../Common/helpers'; @@ -71,6 +71,7 @@ const RegionsSelect = ({ provider, currentRegion, composeID, onChange }) => { selections={currentRegion} onToggle={onToggle} onSelect={onSelect} + isDisabled={!MULTIPLE_REGION_SUPPORT.includes(provider)} > {images.map(({ id, region }) => ( diff --git a/src/constants.js b/src/constants.js index 44c94990..9f8b31e6 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,3 +1,4 @@ export const AWS_PROVIDER = 'aws'; export const AZURE_PROVIDER = 'azure'; export const GCP_PROVIDER = 'gcp'; +export const MULTIPLE_REGION_SUPPORT = [AWS_PROVIDER];