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"; import { StatusTooltip } from "@/components/shared/status-tooltip"; import { DateTooltip } from "@/components/shared/date-tooltip"; import { RefreshToken } from "./refresh-token"; interface Props { applicationId: string; } export const ShowDeployments = ({ applicationId }: Props) => { const [activeLog, setActiveLog] = useState(null); const { data } = api.application.one.useQuery({ applicationId }); const { data: deployments } = api.deployment.all.useQuery( { applicationId }, { enabled: !!applicationId, refetchInterval: 5000, }, ); const [url, setUrl] = React.useState(""); useEffect(() => { setUrl(document.location.origin); }, []); return (
Deployments See all the 10 last deployments for this application
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/${data?.refreshToken}`}
{data?.deployments?.length === 0 ? (
No deployments found
) : (
{deployments?.map((deployment) => (
{deployment.status} {deployment.title}
))}
)} setActiveLog(null)} logPath={activeLog} />
); };