From 2d5acec2d15ae4fe3a25ae8da677bd680c0bbdf6 Mon Sep 17 00:00:00 2001
From: Benjamin Cabanes <3447705+bcabanes@users.noreply.github.com>
Date: Fri, 15 Nov 2024 10:18:34 -0500
Subject: [PATCH] docs(nx-dev): add credit pricing section (#28946)
It renames the ResourceClasses component to CreditPricing and updates its references throughout the application. It also includes additional non-compute pricing information and a more detailed breakdown of credit costs associated with various CI/CD operations for Nx Cloud.
---
nx-dev/nx-dev/app/pricing/page.tsx | 4 +-
nx-dev/ui-pricing/src/index.ts | 2 +-
...esource-classes.tsx => credit-pricing.tsx} | 59 +++++++++++++++++--
nx-dev/ui-pricing/src/lib/faq.tsx | 2 +-
4 files changed, 57 insertions(+), 10 deletions(-)
rename nx-dev/ui-pricing/src/lib/{resource-classes.tsx => credit-pricing.tsx} (75%)
diff --git a/nx-dev/nx-dev/app/pricing/page.tsx b/nx-dev/nx-dev/app/pricing/page.tsx
index 22806df81a37b..ccea644bc7f32 100644
--- a/nx-dev/nx-dev/app/pricing/page.tsx
+++ b/nx-dev/nx-dev/app/pricing/page.tsx
@@ -2,7 +2,7 @@ import type { Metadata } from 'next';
import {
Faq,
Oss,
- ResourceClasses,
+ CreditPricing,
PlansDisplay,
TrialCallout,
} from '@nx/nx-dev/ui-pricing';
@@ -47,7 +47,7 @@ export default function PricingPage() {
-
+
diff --git a/nx-dev/ui-pricing/src/index.ts b/nx-dev/ui-pricing/src/index.ts
index 1dcca6b7ede4e..49b04606f8e16 100644
--- a/nx-dev/ui-pricing/src/index.ts
+++ b/nx-dev/ui-pricing/src/index.ts
@@ -1,5 +1,5 @@
export * from './lib/faq';
export * from './lib/oss';
export * from './lib/plans-display';
-export * from './lib/resource-classes';
+export * from './lib/credit-pricing';
export * from './lib/trial-callout';
diff --git a/nx-dev/ui-pricing/src/lib/resource-classes.tsx b/nx-dev/ui-pricing/src/lib/credit-pricing.tsx
similarity index 75%
rename from nx-dev/ui-pricing/src/lib/resource-classes.tsx
rename to nx-dev/ui-pricing/src/lib/credit-pricing.tsx
index c8a5ed49f5dc8..bf18d1fde36e4 100644
--- a/nx-dev/ui-pricing/src/lib/resource-classes.tsx
+++ b/nx-dev/ui-pricing/src/lib/credit-pricing.tsx
@@ -2,6 +2,16 @@ import { ReactElement } from 'react';
import { LinuxIcon, WindowsIcon } from '@nx/nx-dev/ui-icons';
import { SectionDescription, SectionHeading } from '@nx/nx-dev/ui-common';
+const nonComputeItems = [
+ {
+ name: 'CI Pipeline Execution',
+ description:
+ 'A CI Pipeline Execution is a CI run or a Workflow run (depending on your CI provider). For instance, running a PR or running CI on the main branch are CI Pipeline Executions.',
+ creditCost: 500,
+ suffix: 'execution',
+ },
+];
+
const linuxAmd64 = [
{
icon:
,
@@ -77,7 +87,7 @@ const windows = [
},
];
-export function ResourceClasses(): ReactElement {
+export function CreditPricing(): ReactElement {
return (
- Agents resource classes
-
-
- Credits are the Nx Cloud currency allowing for usage-based pricing.
+ Credit pricing
+
+ Non-compute pricing
+
+
+
+ {nonComputeItems.map((project) => (
+ -
+
+
+
+ {project.name}
+
+
+ {project.description}
+
+
+
+
+ {new Intl.NumberFormat('en-US', {
+ style: 'decimal',
+ }).format(project.creditCost)}{' '}
+ credits/{project.suffix}
+
+
+
+
+ ))}
+
+
+
+ Agents resource classes
+
- {project.creditCost} credits/min
+
+ {new Intl.NumberFormat('en-US', {
+ style: 'decimal',
+ }).format(project.creditCost)}{' '}
+ credits/min
+
diff --git a/nx-dev/ui-pricing/src/lib/faq.tsx b/nx-dev/ui-pricing/src/lib/faq.tsx
index e630fc6b64060..8efa3e0955906 100644
--- a/nx-dev/ui-pricing/src/lib/faq.tsx
+++ b/nx-dev/ui-pricing/src/lib/faq.tsx
@@ -59,7 +59,7 @@ export function Faq(): ReactElement {
{
question: 'What is a CI Pipeline Execution?',
answer:
- 'By default, a CI pipeline execution is a 1:1 match to your CI provider of choice\'s concept of a "workflow".',
+ 'A CI Pipeline Execution is a CI run or a Workflow run (depending on your CI provider). For instance, running a PR or running CI on the main branch are CI Pipeline Executions.',
},
{
question: 'What is the Team Plan?',