The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: branching compute hours copy (#35524)
Kevin Grüneberg77d99e0f042c
diff --git a/apps/docs/content/guides/platform/manage-your-usage/branching.mdx b/apps/docs/content/guides/platform/manage-your-usage/branching.mdxindex 87b57e18bde..59e3b8f3813 100644--- a/apps/docs/content/guides/platform/manage-your-usage/branching.mdx+++ b/apps/docs/content/guides/platform/manage-your-usage/branching.mdx@@ -54,10 +54,10 @@ You can view Branching usage on the [organization's usage page](https://supabasezoomable/>-In the Usage Summary section, you can see how many hours your Preview branches existed during the selected time period. Hover over "Branches Compute Hours" for a detailed breakdown.+In the Usage Summary section, you can see how many hours your Preview branches existed during the selected time period. Hover over "Branching Compute Hours" for a detailed breakdown.<Image- alt="Usage summary Branches Compute Hours"+ alt="Usage summary Branching Compute Hours"src={{light: '/docs/img/guides/platform/usage-summary-branch-hours--light.png',dark: '/docs/img/guides/platform/usage-summary-branch-hours--dark.png',diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsxindex 329c89339f3..16f62d8614e 100644--- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsx+++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/ComputeMetric.tsx@@ -1,6 +1,6 @@import Link from 'next/link'-import { PricingMetric } from 'data/analytics/org-daily-stats-query'+import { ComputeUsageMetric, PricingMetric } from 'data/analytics/org-daily-stats-query'import type { OrgUsageResponse } from 'data/usage/org-usage-query'import { formatCurrency } from 'lib/helpers'import { useMemo } from 'react'@@ -62,18 +62,32 @@ const ComputeMetric = ({ slug, metric, usage, relativeToSubscription }: ComputeM</p><div className="my-2">- <p className="text-sm">- Every project is a dedicated server and database. For every hour your project is- active, it incurs compute costs based on the compute size of your project. Paused- projects do not incur compute costs.{' '}- <Link- href="https://supabase.com/docs/guides/platform/manage-your-usage/compute"- target="_blank"- className="transition text-brand hover:text-brand-600 underline"- >- Read more- </Link>- </p>+ {usageMeta?.metric === ComputeUsageMetric.COMPUTE_HOURS_BRANCH ? (+ <p className="text-sm">+ Each Preview branch is a separate environment with all Supabase services (Database,+ Auth, Storage, etc.).{' '}+ <Link+ href="https://supabase.com/docs/guides/platform/manage-your-usage/branching"+ target="_blank"+ className="transition text-brand hover:text-brand-600 underline"+ >+ Read more+ </Link>+ </p>+ ) : (+ <p className="text-sm">+ Every project is a dedicated server and database. For every hour your project is+ active, it incurs compute costs based on the compute size of your project. Paused+ projects do not incur compute costs.{' '}+ <Link+ href="https://supabase.com/docs/guides/platform/manage-your-usage/compute"+ target="_blank"+ className="transition text-brand hover:text-brand-600 underline"+ >+ Read more+ </Link>+ </p>+ )}</div>{usageMeta && sortedProjectAllocations.length > 0 && (diff --git a/apps/studio/data/analytics/org-daily-stats-query.ts b/apps/studio/data/analytics/org-daily-stats-query.tsindex ee5788aa353..56e50f998e8 100644--- a/apps/studio/data/analytics/org-daily-stats-query.ts+++ b/apps/studio/data/analytics/org-daily-stats-query.ts@@ -69,7 +69,7 @@ export enum ComputeUsageMetric {export const computeUsageMetricLabel = (computeUsageMetric: ComputeUsageMetric) => {switch (computeUsageMetric) {case 'COMPUTE_HOURS_BRANCH':- return 'Branches'+ return 'Branching'case 'COMPUTE_HOURS_XS':return 'Micro'case 'COMPUTE_HOURS_SM':