Skip to content

feat: add one-click quick maintenance with auto-disable on UP#7118

Open
luitelbj wants to merge 5 commits into
louislam:masterfrom
luitelbj:feat/one-click-maintenance
Open

feat: add one-click quick maintenance with auto-disable on UP#7118
luitelbj wants to merge 5 commits into
louislam:masterfrom
luitelbj:feat/one-click-maintenance

Conversation

@luitelbj
Copy link
Copy Markdown

@luitelbj luitelbj commented Mar 8, 2026

Summary

In this pull request, the following changes are made:

  • Add a Quick Maintenance button on the monitor detail page that puts a monitor into maintenance mode with one click
  • Add an End Maintenance button to manually end any active maintenance from the monitor detail page
  • Auto-disable maintenance when the service recovers (DOWN --> UP transition), so operators don't need to remember to end maintenance after fixing issues
  • Add Auto-end when service is UP checkbox to the EditMaintenance form (manual strategy only)
  • Add auto-disable badge on the Manage Maintenance page

Relates to #2984 #3768 #5499

Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • ⚠️ If there are Breaking change (a fix or feature that alters existing functionality in a way that could cause issues) I have called them out
  • 🧠 I have disclosed any use of LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 Any UI changes adhere to visual style of this project.
  • 🛠️ I have self-reviewed and self-tested my code to ensure it works as expected.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🧰 Dependency updates are listed and explained.
  • ⚠️ CI passes and is green.

How It Works

Quick Maintenance button: Creates a manual strategy maintenance with auto_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

  • UI Modifications: Added "Quick Maintenance" and "End Maintenance" buttons to monitor detail page. Added auto-disable checkbox to EditMaintenance form. Added auto-disable badge to Manage Maintenance list.
Event Before After
Monitor active Before After
Edit maintenance Before After
Under Maintenance Before After
Manage Maintenance Before After

This is my first contribution to Uptime Kuma, looking forward to feedback and happy to make any adjustments.

luitelbj added 3 commits March 8, 2026 15:33
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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 8, 2026

Hello and thanks for lending a paw to Uptime Kuma! 🐻👋
As this is your first contribution, please be sure to check out our Pull Request guidelines.
In particular: - Mark your PR as Draft while you’re still making changes - Mark it as Ready for review once it’s fully ready
If you have any design or process questions, feel free to ask them right here in this pull request - unclear documentation is a bug too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant