Merge pull request #745 from bluewave-labs/fix/certificate-check
Add check for monitor type to abort certificate check if not http type, resolves #720
This commit is contained in:
1 file changed
+4
-1
@@ -142,6 +142,9 @@ const DetailsPage = ({ isAdmin }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchCertificate = async () => {
|
const fetchCertificate = async () => {
|
||||||
|
if (monitor?.type !== "http") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const res = await networkService.getCertificateExpiry(
|
const res = await networkService.getCertificateExpiry(
|
||||||
authToken,
|
authToken,
|
||||||
@@ -153,7 +156,7 @@ const DetailsPage = ({ isAdmin }) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
fetchCertificate();
|
fetchCertificate();
|
||||||
}, [authToken, monitorId]);
|
}, [authToken, monitorId, monitor]);
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
let loading = Object.keys(monitor).length === 0;
|
let loading = Object.keys(monitor).length === 0;
|
||||||
|
|||||||
Reference in new issue
Block a user