mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-10 05:55:18 +00:00
* feat: add schema for registry and routes * feat: add docker registry upload * feat: add show cluster * refactor: set the registry url in image in case we have a registry asociated * feat: add update registry and fix the docker url markup * chore: remove --advertise-ip on swarm script * refactor: remove listen address of swarm initialize * feat: add table to show nodes and add dropdown to add manager & workers * refactor: improve interface for cluster * refactor: improve UI * feat: add experimental swarm settings * refactor: remove comments * refactor: prettify json of each setting * refactor: add interface tooltip * refactor: delete static form self registry * refactor: allow to se a empty registry * fix: remove text area warnings * feat: add network swarm json * refactor: update ui * revert: go back to swarm init config * refactor: remove initialization on server, only on setup script * Update LICENSE.MD * feat: appearance theme support system config * refactor: remove logs * fix(README-ru): hyperlink-ed docs url * feat: (#107) webhook listener filter docker events based on image tag. Fixes #107 * refactor: simplify comparison docker tags * refactor: remove return in res status * refactor: prevent to updates download automatically * feat: support code editor (#105) * feat: support code editor * Update codeblock * refactor: remove unused class --------- Co-authored-by: Mauricio Siu <[email protected]> * fix: select the right image from sourcetype (#109) * chore: bump minor version --------- Co-authored-by: hehehai <[email protected]> Co-authored-by: Bayram Tagiev <[email protected]> Co-authored-by: Paulo Santana <[email protected]>
63 lines
1.7 KiB
TypeScript
63 lines
1.7 KiB
TypeScript
import React from "react";
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import { api } from "@/utils/api";
|
|
import { File } from "lucide-react";
|
|
import { UpdateTraefikConfig } from "./update-traefik-config";
|
|
import { CodeEditor } from "@/components/shared/code-editor";
|
|
interface Props {
|
|
applicationId: string;
|
|
}
|
|
|
|
export const ShowTraefikConfig = ({ applicationId }: Props) => {
|
|
const { data } = api.application.readTraefikConfig.useQuery(
|
|
{
|
|
applicationId,
|
|
},
|
|
{ enabled: !!applicationId },
|
|
);
|
|
|
|
return (
|
|
<Card className="bg-background">
|
|
<CardHeader className="flex flex-row justify-between">
|
|
<div>
|
|
<CardTitle className="text-xl">Traefik</CardTitle>
|
|
<CardDescription>
|
|
Modify the traefik config, in rare cases you may need to add
|
|
specific config, becarefull because modifying incorrectly can break
|
|
traefik and your application
|
|
</CardDescription>
|
|
</div>
|
|
</CardHeader>
|
|
<CardContent className="flex flex-col gap-4">
|
|
{data === null ? (
|
|
<div className="flex w-full flex-col items-center justify-center gap-3 pt-10">
|
|
<File className="size-8 text-muted-foreground" />
|
|
<span className="text-base text-muted-foreground">
|
|
No traefik config detected
|
|
</span>
|
|
</div>
|
|
) : (
|
|
<div className="flex flex-col pt-2 relative">
|
|
<div className="flex flex-col gap-6 max-h-[35rem] min-h-[10rem] overflow-y-auto">
|
|
<CodeEditor
|
|
value={data || "Empty"}
|
|
disabled
|
|
className="font-mono"
|
|
/>
|
|
<div className="flex justify-end absolute z-50 right-6 top-6">
|
|
<UpdateTraefikConfig applicationId={applicationId} />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)}
|
|
</CardContent>
|
|
</Card>
|
|
);
|
|
};
|