fix: removing unused code blocks and better handling for filter param

This commit is contained in:
Amol committed 2025-06-15 03:17:22 +05:30
1 parent e366741aa9
commit 91741c2ae5
3 files changed
+1 -5

No files matched your search

@@ -56,7 +56,7 @@ const InfrastructureMonitors = () => {
const { monitors, summary, isLoading, networkError } = useMonitorFetch({
page,
field: field,
filter: toFilterStatus || search,
filter: toFilterStatus ?? search,
rowsPerPage,
updateTrigger,
});
-1
View File
@@ -182,7 +182,6 @@ class NetworkService {
* @param {string} [config.filter] - The filter to apply to the monitors.
* @param {string} [config.field] - The field to sort by.
* @param {string} [config.order] - The order in which to sort the field.
* @param {string} [config.search] - The search term to filter monitors by name.
* @returns {Promise<AxiosResponse>} The response from the axios GET request.
*/
-3
View File
@@ -523,9 +523,6 @@ const getMonitorsByTeamId = async (req) => {
if (type !== undefined) {
matchStage.type = Array.isArray(type) ? { $in: type } : type;
}
if (field === undefined) {
matchStage.name = { $regex: filter, $options: "i" };
}
const summaryResult = await Monitor.aggregate(
buildMonitorSummaryByTeamIdPipeline({ matchStage })