mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 19:03:36 +00:00
Add ssh host endpoint for issuing ssh host cert
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export const getSshCertStatusBadgeDetails = (notAfter: string) => {
|
||||
const currentDate = new Date().getTime();
|
||||
const notAfterDate = new Date(notAfter).getTime();
|
||||
|
||||
let variant: "success" | "primary" | "danger" = "success";
|
||||
let label = "Active";
|
||||
|
||||
if (notAfterDate > currentDate) {
|
||||
variant = "success";
|
||||
label = "Active";
|
||||
} else {
|
||||
variant = "danger";
|
||||
label = "Expired";
|
||||
}
|
||||
|
||||
return { variant, label };
|
||||
};
|
||||
Reference in New Issue
Block a user