Network Service: Monitor Check Func
This commit is contained in:
1 parent
df97b93a9a
commit
4933d11dfd
3 files changed
+25
No files matched your search
@@ -185,6 +185,23 @@ const useResolveIncident = () => {
|
||||
return [resolveIncident, isLoading];
|
||||
};
|
||||
|
||||
const useAckMonitorChecks = () => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const ackMonitorChecks = async (monitorId, setUpdateTrigger) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
} catch (error) {
|
||||
createToast({ body: t("checkHooks.failureResolveMonitor") });
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return [ackMonitorChecks, isLoading];
|
||||
};
|
||||
|
||||
const useAckAllChecks = () => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const { t } = useTranslation();
|
||||
@@ -209,5 +226,6 @@ export {
|
||||
useFetchChecksTeam,
|
||||
useFetchChecksSummaryByTeamId,
|
||||
useResolveIncident,
|
||||
useAckMonitorChecks,
|
||||
useAckAllChecks,
|
||||
};
|
||||
Reference in new issue
Block a user