feat: add one-click quick maintenance with auto-disable on UP#7118
Open
luitelbj wants to merge 5 commits into
Open
feat: add one-click quick maintenance with auto-disable on UP#7118luitelbj wants to merge 5 commits into
luitelbj wants to merge 5 commits into
Conversation
Add a "Quick Maintenance" button on the monitor detail page that creates a manual maintenance with auto_disable_on_up enabled. The heartbeat loop runs actual checks during auto-disable maintenances and automatically ends them when the service is confirmed UP. An "End Maintenance" button allows manually ending any active maintenance from the monitor detail page. Relates to louislam#2984, louislam#3768, louislam#5499
…code Auto-disable maintenance now requires the service to actually go DOWN before auto-ending on UP, preventing premature disable when service was never down. Also removes unused getActiveQuickMaintenance method.
Contributor
|
Hello and thanks for lending a paw to Uptime Kuma! 🐻👋 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In this pull request, the following changes are made:
Relates to #2984 #3768 #5499
Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.
How It Works
Quick Maintenance button: Creates a
manualstrategy maintenance withauto_disable_on_up = true, linked to the monitor. The heartbeat loop continues running actual checks instead of skipping them.Auto-disable logic: During each heartbeat, if the monitor is under an auto-disable maintenance, the actual health check still runs. The result is tracked via
lastActualStatus. When the check detects a DOWN → UP transition, the maintenance is automatically ended and the frontend is updated via socket in real-time. If the service was never DOWN, maintenance stays active until manually ended.End Maintenance button: Works for any active maintenance type (not just quick maintenances), allowing operators to end maintenance directly from the monitor detail page.
Dependencies
No new dependencies added.
AI Disclosure
Claude Code was used during the implementation to assist with parts of the development. All code has been reviewed, understood, and tested.
Screenshots for Visual Changes
This is my first contribution to Uptime Kuma, looking forward to feedback and happy to make any adjustments.