Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 6 .server-changes/highlight-microvm-regions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: improvement
---

Show a `MicroVM` badge next to the region name on the regions page.
6 changes: 6 additions & 0 deletions 6 apps/webapp/app/presenters/v3/RegionsPresenter.server.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type WorkloadType } from "@trigger.dev/database";
import { type Project } from "~/models/project.server";
import { type User } from "~/models/user.server";
import { FEATURE_FLAG } from "~/v3/featureFlags";
Expand All @@ -15,6 +16,7 @@ export type Region = {
staticIPs?: string | null;
isDefault: boolean;
isHidden: boolean;
workloadType: WorkloadType;
};

export class RegionsPresenter extends BasePresenter {
Expand Down Expand Up @@ -76,6 +78,7 @@ export class RegionsPresenter extends BasePresenter {
location: true,
staticIPs: true,
hidden: true,
workloadType: true,
},
where: isAdmin
? undefined
Expand All @@ -99,6 +102,7 @@ export class RegionsPresenter extends BasePresenter {
staticIPs: region.staticIPs ?? undefined,
isDefault: region.id === defaultWorkerInstanceGroupId,
isHidden: region.hidden,
workloadType: region.workloadType,
}));

if (project.defaultWorkerGroupId) {
Expand All @@ -111,6 +115,7 @@ export class RegionsPresenter extends BasePresenter {
location: true,
staticIPs: true,
hidden: true,
workloadType: true,
},
where: { id: project.defaultWorkerGroupId },
});
Expand All @@ -131,6 +136,7 @@ export class RegionsPresenter extends BasePresenter {
staticIPs: defaultWorkerGroup.staticIPs ?? undefined,
isDefault: true,
isHidden: defaultWorkerGroup.hidden,
workloadType: defaultWorkerGroup.workloadType,
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ export default function Page() {
return (
<TableRow key={region.id}>
<TableCell isTabbableCell>
<CopyableText value={region.name} />
<span className="flex items-center gap-2">
<CopyableText value={region.name} />
{region.workloadType === "MICROVM" && (
<Badge variant="small">MicroVM</Badge>
)}
</span>
</TableCell>
<TableCell>
{region.cloudProvider ? (
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.