chore: remove unused regions (#7229)

This commit is contained in:
Pablo Lara
2025-03-13 13:57:16 +01:00
committed by GitHub
parent 7514484c42
commit 44c70b5d01
2 changed files with 2 additions and 100 deletions
@@ -4,12 +4,10 @@ import { Select, SelectItem } from "@nextui-org/react";
import { useRouter, useSearchParams } from "next/navigation";
import React, { useCallback, useMemo } from "react";
import { regions } from "@/lib/helper";
export const CustomRegionSelection: React.FC = () => {
const router = useRouter();
const searchParams = useSearchParams();
const region = "none";
// Memoize selected keys based on the URL
const selectedKeys = useMemo(() => {
const params = searchParams.get("filter[regions]");
@@ -44,9 +42,7 @@ export const CustomRegionSelection: React.FC = () => {
applyRegionFilter(Array.from(keys) as string[])
}
>
{regions.map((region) => (
<SelectItem key={region.key}>{region.label}</SelectItem>
))}
<SelectItem key={region}>{region}</SelectItem>
</Select>
);
};
-94
View File
@@ -123,100 +123,6 @@ export const getErrorMessage = async (error: unknown): Promise<string> => {
return message;
};
export const regions = [
// AWS Regions (ordered by usage)
{ key: "us-east-1", label: "AWS - US East 1" },
{ key: "us-west-1", label: "AWS - US West 1" },
{ key: "us-west-2", label: "AWS - US West 2" },
{ key: "eu-west-1", label: "AWS - EU West 1" },
{ key: "eu-central-1", label: "AWS - EU Central 1" },
{ key: "ap-southeast-1", label: "AWS - AP Southeast 1" },
{ key: "ap-northeast-1", label: "AWS - AP Northeast 1" },
{ key: "ap-southeast-2", label: "AWS - AP Southeast 2" },
{ key: "ca-central-1", label: "AWS - CA Central 1" },
{ key: "sa-east-1", label: "AWS - SA East 1" },
{ key: "af-south-1", label: "AWS - AF South 1" },
{ key: "ap-east-1", label: "AWS - AP East 1" },
{ key: "ap-northeast-2", label: "AWS - AP Northeast 2" },
{ key: "ap-northeast-3", label: "AWS - AP Northeast 3" },
{ key: "ap-south-1", label: "AWS - AP South 1" },
{ key: "ap-south-2", label: "AWS - AP South 2" },
{ key: "ap-southeast-3", label: "AWS - AP Southeast 3" },
{ key: "ap-southeast-4", label: "AWS - AP Southeast 4" },
{ key: "ca-west-1", label: "AWS - CA West 1" },
{ key: "eu-central-2", label: "AWS - EU Central 2" },
{ key: "eu-north-1", label: "AWS - EU North 1" },
{ key: "eu-south-1", label: "AWS - EU South 1" },
{ key: "eu-south-2", label: "AWS - EU South 2" },
{ key: "eu-west-2", label: "AWS - EU West 2" },
{ key: "eu-west-3", label: "AWS - EU West 3" },
{ key: "il-central-1", label: "AWS - IL Central 1" },
{ key: "me-central-1", label: "AWS - ME Central 1" },
{ key: "me-south-1", label: "AWS - ME South 1" },
// Azure Regions (ordered by usage)
{ key: "eastus", label: "Azure - East US" },
{ key: "eastus2", label: "Azure - East US 2" },
{ key: "westeurope", label: "Azure - West Europe" },
{ key: "southeastasia", label: "Azure - Southeast Asia" },
{ key: "uksouth", label: "Azure - UK South" },
{ key: "northeurope", label: "Azure - North Europe" },
{ key: "centralus", label: "Azure - Central US" },
{ key: "westus2", label: "Azure - West US 2" },
{ key: "southcentralus", label: "Azure - South Central US" },
{ key: "australiaeast", label: "Azure - Australia East" },
{ key: "canadacentral", label: "Azure - Canada Central" },
{ key: "japaneast", label: "Azure - Japan East" },
{ key: "koreacentral", label: "Azure - Korea Central" },
{ key: "southafricanorth", label: "Azure - South Africa North" },
{ key: "brazilsouth", label: "Azure - Brazil South" },
{ key: "francecentral", label: "Azure - France Central" },
{ key: "germanywestcentral", label: "Azure - Germany West Central" },
{ key: "switzerlandnorth", label: "Azure - Switzerland North" },
{ key: "uaenorth", label: "Azure - UAE North" },
// Remaining Azure Regions (less frequently used)
{ key: "westus", label: "Azure - West US" },
{ key: "northcentralus", label: "Azure - North Central US" },
{ key: "australiasoutheast", label: "Azure - Australia Southeast" },
{ key: "southindia", label: "Azure - South India" },
{ key: "westindia", label: "Azure - West India" },
{ key: "canadaeast", label: "Azure - Canada East" },
{ key: "francesouth", label: "Azure - France South" },
{ key: "norwayeast", label: "Azure - Norway East" },
{ key: "switzerlandwest", label: "Azure - Switzerland West" },
{ key: "ukwest", label: "Azure - UK West" },
{ key: "uaecentral", label: "Azure - UAE Central" },
{ key: "brazilsoutheast", label: "Azure - Brazil Southeast" },
// GCP Regions (ordered by usage)
{ key: "us-central1", label: "GCP - US Central (Iowa)" },
{ key: "us-east1", label: "GCP - US East (South Carolina)" },
{ key: "us-west1", label: "GCP - US West (Oregon)" },
{ key: "europe-west1", label: "GCP - Europe West (Belgium)" },
{ key: "asia-east1", label: "GCP - Asia East (Taiwan)" },
{ key: "asia-northeast1", label: "GCP - Asia Northeast (Tokyo)" },
{ key: "europe-west2", label: "GCP - Europe West (London)" },
{ key: "europe-west3", label: "GCP - Europe West (Frankfurt)" },
{ key: "europe-west4", label: "GCP - Europe West (Netherlands)" },
{ key: "asia-southeast1", label: "GCP - Asia Southeast (Singapore)" },
{ key: "australia-southeast1", label: "GCP - Australia Southeast (Sydney)" },
{
key: "northamerica-northeast1",
label: "GCP - North America Northeast (Montreal)",
},
// Remaining GCP Regions
{ key: "asia-east2", label: "GCP - Asia East (Hong Kong)" },
{ key: "asia-northeast2", label: "GCP - Asia Northeast (Osaka)" },
{ key: "asia-northeast3", label: "GCP - Asia Northeast (Seoul)" },
{ key: "asia-south1", label: "GCP - Asia South (Mumbai)" },
{ key: "asia-southeast2", label: "GCP - Asia Southeast (Jakarta)" },
{ key: "europe-north1", label: "GCP - Europe North (Finland)" },
{ key: "europe-west6", label: "GCP - Europe West (Zurich)" },
{ key: "southamerica-east1", label: "GCP - South America East (São Paulo)" },
{ key: "us-west2", label: "GCP - US West (Los Angeles)" },
{ key: "us-east4", label: "GCP - US East (Northern Virginia)" },
];
export const permissionFormFields: PermissionInfo[] = [
{
field: "manage_users",