Skip to content

Commit

Permalink
fix(HMS-2114): Disable zone selection for GCP images
Browse files Browse the repository at this point in the history
  • Loading branch information
adiabramovitch authored and ezr-ondrej committed Jul 17, 2023
1 parent 7dedbdd commit 70febe7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Components/RegionsSelect/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 }) => (
<SelectOption aria-label="Region item" key={id} value={region} />
Expand Down
1 change: 1 addition & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -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];

0 comments on commit 70febe7

Please sign in to comment.