Remove deployment

This commit is contained in:
2026-02-15 17:40:24 +01:00
parent e4060d0fba
commit f700ccb855
4 changed files with 78 additions and 3 deletions
+11 -2
View File
@@ -11,7 +11,11 @@ import {
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Plus, Play, Pause, Square, RotateCcw } from "lucide-react";
import { getDeployments, toggleDeployment } from "@/lib/dockship/deploy";
import {
getDeployments,
removeDeployment,
toggleDeployment,
} from "@/lib/dockship/deploy";
import { getApps } from "@/lib/dockship/application";
import { cn } from "@/lib/utils";
import DeployAppDialog from "@/components/dialogs/DeployApp";
@@ -53,6 +57,11 @@ export default function DeploymentsPage() {
await toggleDeployment(deployId, action);
};
const remove = async (deployId: string) => {
console.log(`Removing deployment ${deployId}`);
await removeDeployment(deployId);
};
return (
<DashboardLayout
title="Deployments"
@@ -138,7 +147,7 @@ export default function DeploymentsPage() {
<RotateCcw className="w-3 h-3" />
</Button>
</DeployAppDialog>
<RemoveDialog remove={() => {}} />
<RemoveDialog remove={() => remove(dep.container)} />
</div>
</div>
</CardContent>