diff --git a/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx b/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx index ada3f39721b..35afb66f841 100644 --- a/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx +++ b/apps/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx @@ -7,6 +7,7 @@ import type { IntegrationProjectConnection } from 'data/integrations/integration import { ProjectIndexPageLink } from 'data/prefetchers/project.$ref' import { OrgProject } from 'data/projects/projects-infinite-query' import type { ResourceWarning } from 'data/usage/resource-warnings-query' +import { useCustomContent } from 'hooks/custom-content/useCustomContent' import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled' import { BASE_PATH } from 'lib/constants' import { inferProjectStatus } from './ProjectCard.utils' @@ -28,7 +29,12 @@ export const ProjectCard = ({ resourceWarnings, }: ProjectCardProps) => { const { name, ref: projectRef } = project - const desc = `${project.cloud_provider} | ${project.region}` + + const { infraAwsNimbusLabel } = useCustomContent(['infra:aws_nimbus_label']) + const providerLabel = + project.cloud_provider === 'AWS_NIMBUS' ? infraAwsNimbusLabel : project.cloud_provider + + const desc = `${providerLabel} | ${project.region}` const { projectHomepageShowInstanceSize } = useIsFeatureEnabled([ 'project_homepage:show_instance_size', @@ -47,7 +53,7 @@ export const ProjectCard = ({ title={
{name}
- {desc} + {desc}
- {provider}
+ {providerLabel}
{projectHomepageShowInstanceSize && (
<>
•
@@ -231,6 +234,9 @@ export const ReplicaNode = ({ data }: NodeProps {region.name}
- {provider}
+ {providerLabel}
{projectHomepageShowInstanceSize && !!computeSize && (
<>
•
diff --git a/apps/studio/hooks/custom-content/CustomContent.types.ts b/apps/studio/hooks/custom-content/CustomContent.types.ts
index 8d79b162c03..7fbe87e0741 100644
--- a/apps/studio/hooks/custom-content/CustomContent.types.ts
+++ b/apps/studio/hooks/custom-content/CustomContent.types.ts
@@ -28,6 +28,7 @@ export type CustomContentTypes = {
logsDefaultQuery: string
infraCloudProviders: CloudProvider[]
+ infraAwsNimbusLabel: string
sslCertificateUrl: string
}
diff --git a/apps/studio/hooks/custom-content/custom-content.json b/apps/studio/hooks/custom-content/custom-content.json
index 65686e6f129..2702c8c2728 100644
--- a/apps/studio/hooks/custom-content/custom-content.json
+++ b/apps/studio/hooks/custom-content/custom-content.json
@@ -50,6 +50,7 @@
"logs:default_query": null,
"infra:cloud_providers": ["AWS", "AWS_K8S", "FLY"],
+ "infra:aws_nimbus_label": "AWS Nimbus",
"ssl:certificate_url": "https://supabase-downloads.s3-ap-southeast-1.amazonaws.com/${env}/ssl/${env}-ca-2021.crt"
}
diff --git a/apps/studio/hooks/custom-content/custom-content.sample.json b/apps/studio/hooks/custom-content/custom-content.sample.json
index 3573fc9471a..b7adc83af68 100644
--- a/apps/studio/hooks/custom-content/custom-content.sample.json
+++ b/apps/studio/hooks/custom-content/custom-content.sample.json
@@ -49,42 +49,8 @@
"logs:default_query": "This is a sample query",
- "connect:frameworks": {
- "key": "frameworks",
- "label": "Frameworks",
- "obj": [
- {
- "key": "framework-1",
- "label": "Framework 1",
- "icon": "https://supabase.com/dashboard/img/supabase-logo.svg",
- "guideLink": "https://supabase.com/docs",
- "children": [],
- "files": [
- {
- "name": "sample_env",
- "content": "NEXT_PUBLIC_SUPABASE_URL={{apiUrl}}\nNEXT_PUBLIC_SUPABASE_ANON_KEY={{anonKey}}"
- },
- {
- "name": "sample.ts",
- "content": "import { createClient } from \"@supabase/supabase-js\";\n\nconst supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;\nconst supabaseKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY;\n\nexport const supabase = createClient(supabaseUrl, supabaseKey);"
- }
- ]
- },
- {
- "key": "framework-2",
- "label": "Framework 2",
- "icon": "https://supabase.com/dashboard/img/supabase-logo.svg",
- "guideLink": "https://supabase.com/docs",
- "children": [],
- "files": [
- { "name": "file3.tsx", "content": "Content of File 3" },
- { "name": "file4.tsx", "content": "Content of File 4" }
- ]
- }
- ]
- },
-
"infra:cloud_providers": ["AWS_NIMBUS"],
+ "infra:aws_nimbus_label": "AWS Nimbus",
"ssl:certificate_url": "https://supabase-downloads.s3-ap-southeast-1.amazonaws.com/${env}/ssl/${env}-ca-2021.crt"
}
diff --git a/apps/studio/hooks/custom-content/custom-content.schema.json b/apps/studio/hooks/custom-content/custom-content.schema.json
index bb7f5f8a8a0..5569c4d71fa 100644
--- a/apps/studio/hooks/custom-content/custom-content.schema.json
+++ b/apps/studio/hooks/custom-content/custom-content.schema.json
@@ -74,6 +74,10 @@
"enum": ["AWS", "AWS_K8S", "AWS_NIMBUS", "FLY"]
}
},
+ "infra:aws_nimbus_label": {
+ "type": "string",
+ "description": "The label of the AWS Nimbus provider"
+ },
"ssl:certificate_url": {
"type": "string",
@@ -86,6 +90,7 @@
"project_homepage:example_projects",
"logs:default_query",
"infra:cloud_providers",
+ "infra:aws_nimbus_label",
"ssl:certificate_url"
],
"additionalProperties": false