incidents feature fron-end

This commit is contained in:
karenvicent committed 2025-12-17 18:51:34 -05:00
1 parent fec32380ae
commit fd12ca6e21
19 files changed
+1774 -42

No files matched your search

+31
View File
@@ -1145,6 +1145,37 @@ class NetworkService {
},
});
}
getIncidentsByTeam = async (config) => {
const params = new URLSearchParams();
if (config.monitorId) params.append("monitorId", config.monitorId);
if (config.status !== undefined) params.append("status", config.status);
if (config.resolutionType) params.append("resolutionType", config.resolutionType);
if (config.sortOrder) params.append("sortOrder", config.sortOrder);
if (config.dateRange) params.append("dateRange", config.dateRange);
if (config.page) params.append("page", config.page);
if (config.rowsPerPage) params.append("rowsPerPage", config.rowsPerPage);
return this.axiosInstance.get(`/incidents/team?${params.toString()}`);
};
getIncidentById = async (incidentId) => {
return this.axiosInstance.get(`/incidents/${incidentId}`);
};
resolveIncidentManually = async (incidentId, options = {}) => {
const body = {};
if (options.comment) body.comment = options.comment;
return this.axiosInstance.put(`/incidents/${incidentId}/resolve`, body);
};
getIncidentSummary = async (config = {}) => {
const params = new URLSearchParams();
if (config.limit) params.append("limit", config.limit);
const queryString = params.toString();
return this.axiosInstance.get(
`/incidents/team/summary${queryString ? `?${queryString}` : ""}`
);
};
}
export default NetworkService;