Skip to content

Commit 199589d

Browse files
committed
feat(certificates): display server information in certificate details
- Added a new section to the certificate details view to show associated server information, including the server name and IP address, enhancing the visibility of server-related data for each certificate. - Updated the API to include server data when fetching certificates.
1 parent 91d4fe2 commit 199589d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

apps/dokploy/components/dashboard/settings/certificates/show-certificates.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
ChevronRight,
55
Link,
66
Loader2,
7+
Server,
78
ShieldCheck,
89
Trash2,
910
} from "lucide-react";
@@ -121,6 +122,12 @@ export const ShowCertificates = () => {
121122
CN: {commonName}
122123
</span>
123124
)}
125+
<span className="text-xs text-muted-foreground flex items-center gap-1">
126+
<Server className="size-3" />
127+
{certificate.server
128+
? `${certificate.server.name} (${certificate.server.ipAddress})`
129+
: "Dokploy (Local)"}
130+
</span>
124131
{chainInfo.isChain && (
125132
<div className="flex flex-col gap-1.5 mt-1">
126133
<button

apps/dokploy/server/api/routers/certificate.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ export const certificateRouter = createTRPCRouter({
7474
all: withPermission("certificate", "read").query(async ({ ctx }) => {
7575
return await db.query.certificates.findMany({
7676
where: eq(certificates.organizationId, ctx.session.activeOrganizationId),
77+
with: {
78+
server: true,
79+
},
7780
});
7881
}),
7982
update: withPermission("certificate", "update")

0 commit comments

Comments
 (0)