From 4b166ceca3eac3e7fa3c3769c1b069de9c5dbeed Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 14 Mar 2025 10:06:36 -0700 Subject: [PATCH] add network op --- src/Utils/NetworkService.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Utils/NetworkService.js b/src/Utils/NetworkService.js index 6b9aebd60..b27e0cb06 100644 --- a/src/Utils/NetworkService.js +++ b/src/Utils/NetworkService.js @@ -1033,6 +1033,29 @@ class NetworkService { return this.axiosInstance.delete(`/status-page/${encodedUrl}`, {}); } + + // ************************************ + // Fetch monitors with summary by TeamID + // ************************************ + async getMonitorsWithSummaryByTeamId(config) { + const { teamId, types } = config; + const params = new URLSearchParams(); + + if (types) { + types.forEach((type) => { + params.append("type", type); + }); + } + + return this.axiosInstance.get( + `/monitors/summary/team/${teamId}?${params.toString()}`, + { + headers: { + "Content-Type": "application/json", + }, + } + ); + } } export default NetworkService;