feat: Conditional monitoring #5791
Draft
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.
This PR is intended to add a new functionality that would allow monitors to depend on other monitors. The monitors will be paused while any dependent monitor is down.
If you read the title you probably have deja vu. This is a big topic and had multiple issues/pr-s attached to it. I reviewed them all, along with how they went down. I think from user feedback it's very clear that this feature is much needed. I feel I have the motivation to finally implement a good, working solution from scratch that can be merged.
📋 Overview
My idea is to make this not directly related to the Group function. This mainly because you should be able to add multiple dependencies to a monitor, and I also don't want to make groups to be that different to other monitors (like how it is now). You can add dependencies to both groups and monitors (so it will need still to be based on #4395).
You can add dependencies to any monitor if the monitor you add is
Moving groups will clear both the dependencies of this monitor and remove its dependency from others (warning modal).
This will cut short any circular or transitive dependencies.
When ANY of the dependent monitors are down, the monitor and all monitors below in group tree it will pause. Once the monitor is up, they will resume.
Besides the warning modal, this is the only required UI change in the monitor settings is the one below.
🔄 Changes
🛠️ Type of change
🔗 Related Issues
#4956, #1089, #1236
📷 Screenshots or Visual Changes
Things to consider (for discussion)