mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
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.
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
ChevronRight,
|
||||
Link,
|
||||
Loader2,
|
||||
Server,
|
||||
ShieldCheck,
|
||||
Trash2,
|
||||
} from "lucide-react";
|
||||
@@ -121,6 +122,12 @@ export const ShowCertificates = () => {
|
||||
CN: {commonName}
|
||||
</span>
|
||||
)}
|
||||
<span className="text-xs text-muted-foreground flex items-center gap-1">
|
||||
<Server className="size-3" />
|
||||
{certificate.server
|
||||
? `${certificate.server.name} (${certificate.server.ipAddress})`
|
||||
: "Dokploy (Local)"}
|
||||
</span>
|
||||
{chainInfo.isChain && (
|
||||
<div className="flex flex-col gap-1.5 mt-1">
|
||||
<button
|
||||
|
||||
@@ -74,6 +74,9 @@ export const certificateRouter = createTRPCRouter({
|
||||
all: withPermission("certificate", "read").query(async ({ ctx }) => {
|
||||
return await db.query.certificates.findMany({
|
||||
where: eq(certificates.organizationId, ctx.session.activeOrganizationId),
|
||||
with: {
|
||||
server: true,
|
||||
},
|
||||
});
|
||||
}),
|
||||
update: withPermission("certificate", "update")
|
||||
|
||||
Reference in New Issue
Block a user