Skip to content

Commit 73e22f2

Browse files
Nicolas Pierre-charlesaderghamov
authored andcommitted
feat(ips): exclude non-existent types
ref: #MANAGER-19823 Signed-off-by: Nicolas Pierre-charles <[email protected]>
1 parent 2fd8098 commit 73e22f2

File tree

1 file changed

+17
-5
lines changed
  • packages/manager/apps/ips/src/pages/listing/ipListing/components/filters

1 file changed

+17
-5
lines changed

packages/manager/apps/ips/src/pages/listing/ipListing/components/filters/FilterType.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ import { ListingContext } from '@/pages/listing/listingContext';
66

77
const ALL_IP_TYPE_OPTION_VALUE = 'all';
88

9+
const excludedTypes = [
10+
IpTypeEnum.CDN,
11+
IpTypeEnum.HOSTED_SSL,
12+
IpTypeEnum.HOUSING,
13+
IpTypeEnum.MAIL,
14+
IpTypeEnum.PRIVATE,
15+
IpTypeEnum.VPN,
16+
IpTypeEnum.PCI,
17+
];
18+
919
/**
1020
* Component to filter ip by IP Type
1121
*/
@@ -33,11 +43,13 @@ export const TypeFilter = ({ className }: { className?: string }) => {
3343
<option value={ALL_IP_TYPE_OPTION_VALUE}>
3444
{t('listingFilterTypeAllTypes')}
3545
</option>
36-
{Object.values(IpTypeEnum).map((value) => (
37-
<option key={value} value={value}>
38-
{t(`listingColumnsType_${value}`)}
39-
</option>
40-
))}
46+
{Object.values(IpTypeEnum)
47+
.filter((type) => !excludedTypes.includes(type))
48+
.map((value) => (
49+
<option key={value} value={value}>
50+
{t(`listingColumnsType_${value}`)}
51+
</option>
52+
))}
4153
</OdsSelect>
4254
);
4355
};

0 commit comments

Comments
 (0)