Commit Graph
11 Commits
Author SHA1 Message Date
harsh-aghara c72287cb21 fix(monitor): Resolve build fail.
Fixes #3602
2026-05-06 00:09:29 +05:30
harsh-aghara ba2d23fd82 refactor(monitors): optimize bulkTogglePause from 3 to 2 DB queries
Use find + updateMany with timestamps:false instead of find IDs +
updateMany + fetch updated. Manually set updatedAt and edit
in-memory documents to avoid a third DB round trip.

Fixes #3602
2026-05-05 23:43:06 +05:30
harsh-aghara e725128b10 feat(monitors): track and report bulk action queue failures
Addresses PR feedback:
- Upgrades bulk pausing from Promise.all to Promise.allSettled
- Logs individual job queue sync failures with monitor ID context
- Surfaces failedCount to the frontend via controller response
- Adds unit tests to verify partial failure handling

Fixes #3602
2026-05-05 17:08:25 +05:30
harsh-aghara baf7344e2d fix(ui): enforce strict type safety in bulk action error handling
Addresses PR feedback:
- Replaces forbidden any type in catch block with unknown
- Adds type discrimination using axios.isAxiosError and instanceof Error
- Narrows error type for logger.error compatibility

Fixes #3602
2026-05-05 17:07:13 +05:30
harsh-aghara 387cb35494 refactor(ui): simplify table selection and clarify mobile label rendering
Addresses PR feedback:
- Removes over-abstracted useTableSelection hook, inlines selection logic
- Replaces triple-condition with explicit hideMobileLabel bool flag
- Removes unsafe Record<string, never> casting

Fixes #3602
2026-05-05 17:06:48 +05:30
harsh-aghara 657a35e948 feat(i18n): implement strict pluralization for bulk action notifications
Removes generic '(s)' syntax from backend responses. Adds proper _one and _other pluralization keys to all 16 locales with native grammar translations, resolving 0-count edge cases.

Fixes #3602
2026-05-02 14:28:15 +05:30
harsh-aghara 1b0b17b589 fix(ui): correct table header alignment glitch caused by checkbox injection
Adds explicit 'align' support to Table headers to override strict index-based alignment. Restores exact center-alignment spacer boxes to Uptime and Infrastructure tables to match develop branch styling.

Fixes #3602
2026-05-02 14:28:13 +05:30
harsh-aghara ff34c872c8 refactor(ui): convert BulkActionsBar to modular bottom pill using children pattern
Resolves maintainer feedback regarding UI/UX layout and prevents code collisions with other PRs by extracting action logic out of the bar component.

Fixes #3602
2026-05-02 14:28:12 +05:30
Retr01-sudo 4e284c1468 feat(monitors): integrate bulk actions into uptime and infrastructure tables
- Mounts selection checkboxes in UptimeMonitorsTable and MonitorsTable
- Enhances global Table.tsx to cleanly render checkboxes on mobile cards via mobileLabel
- Injects BulkActionsBar into main list views

Fixes #3602
2026-05-01 19:44:07 +05:30
Retr01-sudo 6b9759e455 feat(monitors): create bulk actions ui components and selection hooks
- Extracts generic table selection logic into useTableSelection hook
- Creates BulkActionsBar component with Collapse animations
- Implements useBulkMonitorActions to handle API logic and toasts
- Adds i18n translation strings across all 16 locales

Fixes #3602
2026-05-01 19:43:27 +05:30
Retr01-sudo 094def117a feat(monitors): add bulk pause/resume api endpoints and service logic
- Validates bulk monitor IDs using zod
- Implements optimized Mongo $in/$ne queries for performance
- Orchestrates background job pausing/resuming via BullMQ
- Added comprehensive unit tests for monitor service logic

Fixes #3602
2026-05-01 19:42:51 +05:30