Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

add "rotated <time> ago" badge to account rows

x032205f9fe5e8b0e30
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx
index 3d2f3227d4..758ef2c207 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/PamAccountRow.tsx
@@ -7,10 +7,12 @@ import {
faEllipsisV,
faFolder,
faRightToBracket,
+ faRotate,
faTrash
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { twMerge } from "tailwind-merge";
+import { formatDistance } from "date-fns";
import { createNotification } from "@app/components/notifications";
import { ProjectPermissionCan } from "@app/components/permissions";
@@ -100,6 +102,12 @@ export const PamAccountRow = ({
</span>
</Badge>
)}
+ {account.lastRotatedAt && (
+ <Badge className="flex h-5 w-min items-center gap-1.5 bg-orange/20 whitespace-nowrap text-orange">
+ <FontAwesomeIcon icon={faRotate} />
+ <span>Rotated {formatDistance(new Date(), account.lastRotatedAt)} ago</span>
+ </Badge>
+ )}
</div>
</div>
</Td>