mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
Lint fix
This commit is contained in:
@@ -175,11 +175,11 @@ export const CertificatesTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
|
|
||||||
const canShowAutoRenewalIcon = Boolean(
|
const canShowAutoRenewalIcon = Boolean(
|
||||||
certificate.profileId &&
|
certificate.profileId &&
|
||||||
certificate.hasPrivateKey !== false &&
|
certificate.hasPrivateKey !== false &&
|
||||||
!certificate.renewedByCertificateId &&
|
!certificate.renewedByCertificateId &&
|
||||||
!isRevoked &&
|
!isRevoked &&
|
||||||
!isExpired &&
|
!isExpired &&
|
||||||
!isExpiringWithinDay
|
!isExpiringWithinDay
|
||||||
);
|
);
|
||||||
|
|
||||||
// Still need originalDisplayName for other uses in the component
|
// Still need originalDisplayName for other uses in the component
|
||||||
@@ -255,7 +255,7 @@ export const CertificatesTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
ttlDays: Math.ceil(
|
ttlDays: Math.ceil(
|
||||||
(new Date(certificate.notAfter).getTime() -
|
(new Date(certificate.notAfter).getTime() -
|
||||||
new Date(certificate.notBefore).getTime()) /
|
new Date(certificate.notBefore).getTime()) /
|
||||||
(24 * 60 * 60 * 1000)
|
(24 * 60 * 60 * 1000)
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
@@ -341,20 +341,20 @@ export const CertificatesTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
!isAllowed &&
|
!isAllowed &&
|
||||||
"pointer-events-none cursor-not-allowed opacity-50"
|
"pointer-events-none cursor-not-allowed opacity-50"
|
||||||
)}
|
)}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
const notAfterDate = new Date(certificate.notAfter);
|
const notAfterDate = new Date(certificate.notAfter);
|
||||||
const notBeforeDate = certificate.notBefore
|
const notBeforeDate = certificate.notBefore
|
||||||
? new Date(certificate.notBefore)
|
? new Date(certificate.notBefore)
|
||||||
: new Date(
|
: new Date(
|
||||||
notAfterDate.getTime() - 365 * 24 * 60 * 60 * 1000
|
notAfterDate.getTime() - 365 * 24 * 60 * 60 * 1000
|
||||||
);
|
);
|
||||||
const ttlDays = Math.max(
|
const ttlDays = Math.max(
|
||||||
1,
|
1,
|
||||||
Math.ceil(
|
Math.ceil(
|
||||||
(notAfterDate.getTime() - notBeforeDate.getTime()) /
|
(notAfterDate.getTime() - notBeforeDate.getTime()) /
|
||||||
(24 * 60 * 60 * 1000)
|
(24 * 60 * 60 * 1000)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
handlePopUpOpen("manageRenewal", {
|
handlePopUpOpen("manageRenewal", {
|
||||||
@@ -404,7 +404,7 @@ export const CertificatesTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
!isAllowed &&
|
!isAllowed &&
|
||||||
"pointer-events-none cursor-not-allowed opacity-50"
|
"pointer-events-none cursor-not-allowed opacity-50"
|
||||||
)}
|
)}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await handleDisableAutoRenewal(
|
await handleDisableAutoRenewal(
|
||||||
@@ -441,7 +441,7 @@ export const CertificatesTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
!isAllowed &&
|
!isAllowed &&
|
||||||
"pointer-events-none cursor-not-allowed opacity-50"
|
"pointer-events-none cursor-not-allowed opacity-50"
|
||||||
)}
|
)}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
handlePopUpOpen("renewCertificate", {
|
handlePopUpOpen("renewCertificate", {
|
||||||
@@ -503,7 +503,7 @@ export const CertificatesTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
!isAllowed &&
|
!isAllowed &&
|
||||||
"pointer-events-none cursor-not-allowed opacity-50"
|
"pointer-events-none cursor-not-allowed opacity-50"
|
||||||
)}
|
)}
|
||||||
onClick={async () =>
|
onClick={async () =>
|
||||||
handlePopUpOpen("revokeCertificate", {
|
handlePopUpOpen("revokeCertificate", {
|
||||||
|
|||||||
Reference in New Issue
Block a user