feat: allow maintenance without affected monitors#6606
feat: allow maintenance without affected monitors#6606CommanderStorm merged 7 commits intolouislam:masterfrom
Conversation
I don't think Uptime Kuma will send maintenance notifications. If you are vibe coding, be careful don't waste our time. And maybe off topic, but why there are so many pr linked with Gittensor recently, you guys ignore our pull request template completely. |
|
Hi @louislam, thanks for the feedback. You're right — I misspoke in the description. Maintenance windows don't send notifications; they display on status pages and suppress alerts during the scheduled period. I should have been more careful with the wording. The actual use case from #6177 is straightforward: sometimes you want to show a maintenance message on a status page for a service that isn't monitored (or can't be monitored). Right now the UI blocks you from saving unless you pick at least one monitor, so users have to create dummy monitors as a workaround. This PR just removes that frontend validation. The backend already accepts empty monitor arrays, so it's a one-line change. Regarding the PR template — apologies for missing that. I'll make sure to follow it properly on future contributions. Happy to close this if you'd prefer a different approach, or I can update the description to be more accurate. Let me know. |
- Add Confirm modal when creating maintenance without affected monitors - Replace unused 'atLeastOneMonitor' translation with 'noMonitorsSelectedWarning' - Allow maintenance creation without monitors (user must confirm) Addresses review feedback on PR louislam#6606
de63005 to
ad662cc
Compare
- Add Confirm modal when creating maintenance without affected monitors - Replace unused 'atLeastOneMonitor' translation with 'noMonitorsSelectedWarning' - Allow maintenance creation without monitors (user must confirm) Addresses review feedback on PR louislam#6606
Removes the validation that requires at least one monitor to be selected when creating or editing maintenance. This allows users to create maintenance notifications for services that cannot be monitored. Fixes louislam#6177
- Add Confirm modal when creating maintenance without affected monitors - Replace unused 'atLeastOneMonitor' translation with 'noMonitorsSelectedWarning' - Allow maintenance creation without monitors (user must confirm) Addresses review feedback on PR louislam#6606
ad662cc to
6df28f5
Compare
|
@CommanderStorm could you please merge the PR? |
CommanderStorm
left a comment
There was a problem hiding this comment.
Thank you and sorry for the misunderstanding 😓
Allow Maintenance Without Affected Monitors
Summary
This PR removes the requirement to select at least one monitor when creating or editing a maintenance window.
Problem
Currently, when scheduling maintenance in Uptime Kuma, users are forced to select at least one affected monitor. However, there are legitimate use cases where you want to create a maintenance notification without linking it to any specific monitor:
As the issue author mentioned, the current workaround is to create a dummy group that isn't displayed on any status page, which is clunky and adds unnecessary clutter.
Solution
Removed the frontend validation that blocks maintenance creation when no monitors are selected. The backend already handles empty monitor arrays gracefully, so this was purely a UI restriction.
Changes
src/pages/EditMaintenance.vue: Removed the validation check that requiredaffectedMonitors.length > 0Testing
Related Issue
Fixes #6177
Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=94194147