Remove deployment
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user