Skip to content
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
2 changes: 1 addition & 1 deletion apps/webservice/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const config = {

experimental: {
turbo: {},
reactCompiler: true,
reactCompiler: false,
optimizePackageImports: ["googleapis"],
},

Expand Down
1 change: 0 additions & 1 deletion apps/webservice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
"@types/uuid": "^10.0.0",
"@xterm/addon-webgl": "^0.18.0",
"atlassian-openapi": "^1.0.21",
"babel-plugin-react-compiler": "19.0.0-beta-40c6c23-20250301",
"dotenv-cli": "catalog:",
"eslint": "catalog:",
"jiti": "^1.21.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,23 @@ import { Sidebars } from "~/app/[workspaceSlug]/sidebars";
import { api } from "~/trpc/server";
import { AgentCard } from "./AgentCard";

export const generateMetadata = async (props: {
export const generateMetadata = async ({
params,
}: {
params: { workspaceSlug: string };
}): Promise<Metadata> => {
try {
const workspace = await api.workspace.bySlug(props.params.workspaceSlug);
return {
title: `Agents | ${workspace?.name ?? props.params.workspaceSlug} | Ctrlplane`,
description: `Manage deployment agents for the ${workspace?.name ?? props.params.workspaceSlug} workspace.`,
};
} catch {
return {
const { workspaceSlug } = params;

return api.workspace
.bySlug(workspaceSlug)
.then((workspace) => ({
title: `Agents | ${workspace?.name ?? workspaceSlug} | Ctrlplane`,
description: `Manage deployment agents for the ${workspace?.name ?? workspaceSlug} workspace.`,
}))
.catch(() => ({
title: "Agents | Ctrlplane",
description: "Manage and monitor deployment agents in Ctrlplane.",
};
}
}));
};

export default async function AgentsPage(props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@ import { notFound } from "next/navigation";
import { api } from "~/trpc/server";
import { SystemsPageContent } from "./SystemsPageContent";

export const generateMetadata = async (props: {
export const generateMetadata = async ({
params,
}: {
params: { workspaceSlug: string };
}): Promise<Metadata> => {
try {
const workspace = await api.workspace.bySlug(props.params.workspaceSlug);
return {
title: `Systems | ${workspace?.name ?? props.params.workspaceSlug} | Ctrlplane`,
description: `Manage and deploy systems for the ${workspace?.name ?? props.params.workspaceSlug} workspace.`,
};
} catch {
return {
const { workspaceSlug } = params;

return api.workspace
.bySlug(workspaceSlug)
.then((workspace) => ({
title: `Systems | ${workspace?.name ?? workspaceSlug} | Ctrlplane`,
description: `Manage and deploy systems for the ${workspace?.name ?? workspaceSlug} workspace.`,
}))
.catch(() => ({
title: "Systems | Ctrlplane",
description: "Manage and deploy your systems with Ctrlplane.",
};
}
}));
};

export default async function SystemsPage(props: {
Expand Down
24 changes: 13 additions & 11 deletions apps/webservice/src/app/[workspaceSlug]/(app)/insights/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@ import { WorkspaceResources } from "./overview-cards/WorkspaceResources";
import { ResourceTypeBreakdown } from "./ResourceTypeBreakdown";
import { SystemHealthOverview } from "./SystemHealthOverview";

export const generateMetadata = async (props: {
export const generateMetadata = async ({
params,
}: {
params: { workspaceSlug: string };
}): Promise<Metadata> => {
try {
const workspace = await api.workspace.bySlug(props.params.workspaceSlug);
return {
title: `Insights | ${workspace?.name ?? props.params.workspaceSlug} | Ctrlplane`,
description: `Analytics and performance metrics for the ${workspace?.name ?? props.params.workspaceSlug} workspace.`,
};
} catch {
return {
const { workspaceSlug } = params;

return api.workspace
.bySlug(workspaceSlug)
.then((workspace) => ({
title: `Insights | ${workspace?.name ?? workspaceSlug} | Ctrlplane`,
description: `Analytics and performance metrics for the ${workspace?.name ?? workspaceSlug} workspace.`,
}))
.catch(() => ({
title: "Insights | Ctrlplane",
description:
"Analytics and performance metrics for your Ctrlplane workspace.",
};
}
}));
};

type Props = {
Expand Down
4 changes: 2 additions & 2 deletions apps/webservice/src/app/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ const workspace = (slug: string) => {
};

const workspaceJobAgents = (slug: string) => {
const base = [slug, "agents"];
const base = [slug, "job-agents"];
return {
baseUrl: () => buildUrl(...base),
integrations: () => buildUrl(...base, "integrations"),
integrations: () => workspaceSettingsIntegrations(slug),
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const JobAgentSelector: React.FC<{
onChange={onChange}
/>
<Link
href={urls.workspace(workspace.slug).agents().integrations()}
href={urls.workspace(workspace.slug).agents().integrations().baseUrl()}
passHref
>
<Button className="flex items-center" variant="outline" size="icon">
Expand Down
2 changes: 1 addition & 1 deletion apps/webservice/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"src/**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
"exclude": ["node_modules", ".next"]
}
68 changes: 24 additions & 44 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading