Skip to content

Commit a1c875c

Browse files
authored
[Dashboard] Add self-service dedicated engine deployment option (#7325)
1 parent 38f1821 commit a1c875c

File tree

7 files changed

+213
-142
lines changed

7 files changed

+213
-142
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/cloud/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function TransactionsLayout(props: {
6060
</div>
6161
</div>
6262
<Link href={`${engineBaseSlug}/dedicated`}>
63-
<Button variant="outline">View dedicated engines</Button>
63+
<Button variant="outline">View Dedicated Engine</Button>
6464
</Link>
6565
</div>
6666
</div>

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/EngineFooterCard.stories.tsx

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const meta = {
55
title: "Engine/EngineFooterCard",
66
component: EngineFooterCard,
77
args: {
8-
team_slug: "demo-team",
9-
project_slug: "demo-project",
8+
teamSlug: "demo-team",
9+
projectSlug: "demo-project",
1010
},
1111
decorators: [
1212
(Story) => (
@@ -20,26 +20,8 @@ const meta = {
2020
export default meta;
2121
type Story = StoryObj<typeof meta>;
2222

23-
export const Growth: Story = {
24-
args: {
25-
teamPlan: "growth",
26-
},
27-
};
23+
export const Growth: Story = {};
2824

29-
export const Accelerate: Story = {
30-
args: {
31-
teamPlan: "accelerate",
32-
},
33-
};
25+
export const Scale: Story = {};
3426

35-
export const Scale: Story = {
36-
args: {
37-
teamPlan: "scale",
38-
},
39-
};
40-
41-
export const Pro: Story = {
42-
args: {
43-
teamPlan: "pro",
44-
},
45-
};
27+
export const Pro: Story = {};

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/_components.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { Team } from "@/api/team";
21
import { Button } from "@/components/ui/button";
32
import { TrackedLinkTW } from "@/components/ui/tracked-link";
43
import { ArrowRightIcon, DownloadIcon, ExternalLinkIcon } from "lucide-react";
@@ -75,15 +74,14 @@ function EngineInfoSection(props: { team_slug: string; project_slug: string }) {
7574
}
7675

7776
export function EngineFooterCard(props: {
78-
teamPlan: Team["billingPlan"];
79-
team_slug: string;
80-
project_slug: string;
77+
teamSlug: string;
78+
projectSlug: string;
8179
}) {
8280
return (
8381
<div className="relative rounded-lg border p-6">
8482
<EngineInfoSection
85-
team_slug={props.team_slug}
86-
project_slug={props.project_slug}
83+
team_slug={props.teamSlug}
84+
project_slug={props.projectSlug}
8785
/>
8886
</div>
8987
);

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.stories.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { EngineInstance } from "@3rdweb-sdk/react/hooks/useEngine";
22
import type { Meta, StoryObj } from "@storybook/react";
3+
import { teamStub } from "../../../../../../../../../../stories/stubs";
34
import { EngineInstancesTableUI } from "./engine-instances-table";
45

56
const meta: Meta<typeof Story> = {
@@ -109,15 +110,15 @@ export const NoInstancesProPlan: Story = {
109110
args: {
110111
instances: [],
111112
engineLinkPrefix: "/team/test/engine",
112-
teamPlan: "pro",
113+
team: teamStub("1", "pro"),
113114
},
114115
};
115116

116117
export const NoInstancesGrowthPlan: Story = {
117118
args: {
118119
instances: [],
119120
engineLinkPrefix: "/team/test/engine",
120-
teamPlan: "growth",
121+
team: teamStub("2", "growth"),
121122
},
122123
};
123124

@@ -127,7 +128,7 @@ export const NoInstancesAcceleratePlan: Story = {
127128
args: {
128129
instances: [],
129130
engineLinkPrefix: "/team/test/engine",
130-
teamPlan: "accelerate",
131+
team: teamStub("3", "accelerate"),
131132
},
132133
};
133134

0 commit comments

Comments
 (0)