Feat/default notification channels - #3656
Conversation
- Add isDefault field to notification model and types - Add endpoints: GET /notifications/defaults, PATCH /notifications/:id/default, POST /notifications/:id/apply-to-all - Add bulk add/remove notifications to monitors (PATCH /monitors/notifications) - Add UI for marking notifications as default - Add bulk notification actions in Uptime and Infrastructure monitor pages - Add Apply to All button in notification creation form - Auto-attach default notifications to new monitors - Update OpenAPI spec with new endpoints - Fix duplicate imports and JSON syntax in en.json
The createNotificationBodyValidation schema was stripping out the isDefault field when updating notifications, preventing the Default Channel feature from working properly. Changes: - Add isDefault: z.boolean().optional() to all 10 notification type schemas (email, webhook, slack, discord, pager_duty, matrix, teams, telegram, pushover, twilio) - Fix TypeScript type errors in frontend components - Fix import name in Infrastructure/Monitors page This enables users to toggle 'Default channel' on notifications and have them auto-attached to new monitors.
|
Hi @the-last-php-bender, Thanks a lot for taking the time to contribute to the project. That said, the maintainers are working with limited bandwidth, and a diff this large takes a lot of context to review thoroughly. Would you be able to break this into a few smaller, focused PRs (or trim the scope)? |
|
Ok |
|
Hi @the-last-php-bender any update? |
I will be dropping updating on it soon splitting it is kinda a Hassel because the feature is dependent on each other |
|
@the-last-php-bender I would recommend to close this PR and create a new one, since we have refactored a lot of the server codebase, so there are a lot of moving pieces. |
Okay but I will have to pull a d it might break what I have worked on or what do you think? |
|
@the-last-php-bender pull the latest changes, get your codebase up to date with our develop branch, and then start with the implementation with a more focused approach. |
Ok thanks |
Describe your changes
Briefly describe the changes you made and their purpose.
This PR implements the ability to bulk-assign Notification Channels to Alerts as requested in issue #3601. The implementation includes:
Backend changes:
Frontend changes:
Write your issue number after "Fixes "
Fixes #3601
Please ensure all items are checked off before requesting a review. "Checked off" means you need to add an "x" character between brackets so they turn into checkmarks.
<div>Add</div>, use):npm run formatin server and client directories, which automatically formats your code.