import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { api } from "@/utils/api"; import { RocketIcon } from "lucide-react"; import React, { useEffect, useState } from "react"; // import { CancelQueues } from "./cancel-queues"; // import { ShowDeployment } from "./show-deployment-compose"; import { StatusTooltip } from "@/components/shared/status-tooltip"; import { DateTooltip } from "@/components/shared/date-tooltip"; import { ShowDeploymentCompose } from "./show-deployment-compose"; import { RefreshTokenCompose } from "./refresh-token-compose"; import { CancelQueuesCompose } from "./cancel-queues-compose"; // import { RefreshToken } from "./refresh-token";// interface Props { composeId: string; } export const ShowDeploymentsCompose = ({ composeId }: Props) => { const [activeLog, setActiveLog] = useState(null); const { data } = api.compose.one.useQuery({ composeId }); const { data: deployments } = api.deployment.allByCompose.useQuery( { composeId }, { enabled: !!composeId, refetchInterval: 5000, }, ); const [url, setUrl] = React.useState(""); useEffect(() => { setUrl(document.location.origin); }, []); return (
Deployments See all the 10 last deployments for this compose
{/* */}
If you want to re-deploy this application use this URL in the config of your git provider or docker
Webhook URL:
{`${url}/api/deploy/compose/${data?.refreshToken}`}
{data?.deployments?.length === 0 ? (
No deployments found
) : (
{deployments?.map((deployment) => (
{deployment.status} {deployment.title}
))}
)} setActiveLog(null)} logPath={activeLog} />
); };