mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-07 04:22:16 +00: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,
|
ChevronRight,
|
||||||
Link,
|
Link,
|
||||||
Loader2,
|
Loader2,
|
||||||
|
Server,
|
||||||
ShieldCheck,
|
ShieldCheck,
|
||||||
Trash2,
|
Trash2,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
@@ -121,6 +122,12 @@ export const ShowCertificates = () => {
|
|||||||
CN: {commonName}
|
CN: {commonName}
|
||||||
</span>
|
</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 && (
|
{chainInfo.isChain && (
|
||||||
<div className="flex flex-col gap-1.5 mt-1">
|
<div className="flex flex-col gap-1.5 mt-1">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -74,6 +74,9 @@ export const certificateRouter = createTRPCRouter({
|
|||||||
all: withPermission("certificate", "read").query(async ({ ctx }) => {
|
all: withPermission("certificate", "read").query(async ({ ctx }) => {
|
||||||
return await db.query.certificates.findMany({
|
return await db.query.certificates.findMany({
|
||||||
where: eq(certificates.organizationId, ctx.session.activeOrganizationId),
|
where: eq(certificates.organizationId, ctx.session.activeOrganizationId),
|
||||||
|
with: {
|
||||||
|
server: true,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
update: withPermission("certificate", "update")
|
update: withPermission("certificate", "update")
|
||||||
|
|||||||
Reference in New Issue
Block a user