fix: unable to open deployment code template
This commit is contained in:
parent
163e6f0426
commit
1a0d73ff8b
@ -1,4 +1,4 @@
|
|||||||
import { DeploymentRow } from "./DeploymentRow";
|
import { DeploymentRow, SharePageDeploymentRow } from "./DeploymentRow";
|
||||||
import { CodeBlock } from "@/components/CodeBlock";
|
import { CodeBlock } from "@/components/CodeBlock";
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
@ -9,6 +9,7 @@ import {
|
|||||||
DialogTrigger,
|
DialogTrigger,
|
||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||||
|
import { TableRow } from "@/components/ui/table";
|
||||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
import { getInputsFromWorkflow } from "@/lib/getInputsFromWorkflow";
|
import { getInputsFromWorkflow } from "@/lib/getInputsFromWorkflow";
|
||||||
import type { findAllDeployments } from "@/server/findAllRuns";
|
import type { findAllDeployments } from "@/server/findAllRuns";
|
||||||
@ -91,13 +92,15 @@ export function DeploymentDisplay({
|
|||||||
const workflowInput = getInputsFromWorkflow(deployment.version);
|
const workflowInput = getInputsFromWorkflow(deployment.version);
|
||||||
|
|
||||||
if (deployment.environment == "public-share") {
|
if (deployment.environment == "public-share") {
|
||||||
return <DeploymentRow deployment={deployment} />;
|
return <SharePageDeploymentRow deployment={deployment} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog>
|
<Dialog>
|
||||||
<DialogTrigger asChild className="appearance-none hover:cursor-pointer">
|
<DialogTrigger asChild className="appearance-none hover:cursor-pointer">
|
||||||
<DeploymentRow deployment={deployment} />
|
<TableRow>
|
||||||
|
<DeploymentRow deployment={deployment} />
|
||||||
|
</TableRow>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogContent className="max-w-3xl">
|
<DialogContent className="max-w-3xl">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
|
@ -5,7 +5,7 @@ import { getRelativeTime } from "@/lib/getRelativeTime";
|
|||||||
import type { findAllDeployments } from "@/server/findAllRuns";
|
import type { findAllDeployments } from "@/server/findAllRuns";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export function DeploymentRow({
|
export function SharePageDeploymentRow({
|
||||||
deployment,
|
deployment,
|
||||||
}: {
|
}: {
|
||||||
deployment: Awaited<ReturnType<typeof findAllDeployments>>[0];
|
deployment: Awaited<ReturnType<typeof findAllDeployments>>[0];
|
||||||
@ -35,3 +35,26 @@ export function DeploymentRow({
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function DeploymentRow({
|
||||||
|
deployment,
|
||||||
|
}: {
|
||||||
|
deployment: Awaited<ReturnType<typeof findAllDeployments>>[0];
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<TableCell className="capitalize truncate">
|
||||||
|
{deployment.environment}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium truncate">
|
||||||
|
{deployment.version?.version}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="font-medium truncate">
|
||||||
|
{deployment.machine?.name}
|
||||||
|
</TableCell>
|
||||||
|
<TableCell className="text-right truncate">
|
||||||
|
{getRelativeTime(deployment.updated_at)}
|
||||||
|
</TableCell>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user