mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add server IP address
This commit is contained in:
@@ -70,7 +70,7 @@ interface Props {
|
|||||||
|
|
||||||
export const AddApplication = ({ projectId, projectName }: Props) => {
|
export const AddApplication = ({ projectId, projectName }: Props) => {
|
||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const slug = slugify(projectName);
|
const slug = slugify(projectName);
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
@@ -166,7 +166,7 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
||||||
Select a Server (Optional)
|
Select a Server {!isCloud ? "(Optional)" : ""}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -197,7 +197,12 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
const [visible, setVisible] = useState(false);
|
const [visible, setVisible] = useState(false);
|
||||||
const slug = slugify(projectName);
|
const slug = slugify(projectName);
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
const { mutateAsync, isLoading, error, isError } =
|
const { mutateAsync, isLoading, error, isError } =
|
||||||
api.compose.create.useMutation();
|
api.compose.create.useMutation();
|
||||||
@@ -173,7 +174,7 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
||||||
Select a Server (Optional)
|
Select a Server {!isCloud ? "(Optional)" : ""}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -204,7 +205,12 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
const [viewMode, setViewMode] = useState<"detailed" | "icon">("detailed");
|
const [viewMode, setViewMode] = useState<"detailed" | "icon">("detailed");
|
||||||
const [selectedTags, setSelectedTags] = useState<string[]>([]);
|
const [selectedTags, setSelectedTags] = useState<string[]>([]);
|
||||||
const { data } = api.compose.templates.useQuery();
|
const { data } = api.compose.templates.useQuery();
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
const { data: tags, isLoading: isLoadingTags } =
|
const { data: tags, isLoading: isLoadingTags } =
|
||||||
api.compose.getTags.useQuery();
|
api.compose.getTags.useQuery();
|
||||||
@@ -372,7 +373,8 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<Label className="break-all w-fit flex flex-row gap-1 items-center pb-2 pt-3.5">
|
<Label className="break-all w-fit flex flex-row gap-1 items-center pb-2 pt-3.5">
|
||||||
Select a Server (Optional)
|
Select a Server{" "}
|
||||||
|
{!isCloud ? "(Optional)" : ""}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</Label>
|
</Label>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -405,7 +407,12 @@ export const AddTemplate = ({ projectId }: Props) => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>
|
<SelectLabel>
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ export const AddCertificate = () => {
|
|||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const utils = api.useUtils();
|
const utils = api.useUtils();
|
||||||
|
|
||||||
|
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||||
const { mutateAsync, isError, error, isLoading } =
|
const { mutateAsync, isError, error, isLoading } =
|
||||||
api.certificates.create.useMutation();
|
api.certificates.create.useMutation();
|
||||||
const { data: servers } = api.server.withSSHKey.useQuery();
|
const { data: servers } = api.server.withSSHKey.useQuery();
|
||||||
@@ -181,7 +182,7 @@ export const AddCertificate = () => {
|
|||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
<FormLabel className="break-all w-fit flex flex-row gap-1 items-center">
|
||||||
Select a Server (Optional)
|
Select a Server {!isCloud && "(Optional)"}
|
||||||
<HelpCircle className="size-4 text-muted-foreground" />
|
<HelpCircle className="size-4 text-muted-foreground" />
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
@@ -202,7 +203,12 @@ export const AddCertificate = () => {
|
|||||||
key={server.serverId}
|
key={server.serverId}
|
||||||
value={server.serverId}
|
value={server.serverId}
|
||||||
>
|
>
|
||||||
{server.name}
|
<span className="flex items-center gap-2 justify-between w-full">
|
||||||
|
<span>{server.name}</span>
|
||||||
|
<span className="text-muted-foreground text-xs self-center">
|
||||||
|
{server.ipAddress}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
))}
|
))}
|
||||||
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
<SelectLabel>Servers ({servers?.length})</SelectLabel>
|
||||||
|
|||||||
Reference in New Issue
Block a user