-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(detectors): Add disabled alert to uptime and cron detector details #103165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(detectors): Add disabled alert to uptime and cron detector details #103165
Conversation
Adds a reusable DisabledAlert component that displays a muted alert when a detector is disabled, with a one-click enable button. The alert automatically hides when the detector becomes enabled. Uptime detectors show: "This monitor is disabled and not recording uptime checks." Cron detectors show: "This monitor is disabled and not accepting check-ins." Fixes [NEW-565: Disabled monitors should show a indicator that disabling means not accepting check-ins](https://linear.app/getsentry/issue/NEW-565/disabled-monitors-should-show-a-indicator-that-disabling-means-not) Fixes [NEW-616: Indicate that the monitor is disabled](https://linear.app/getsentry/issue/NEW-616/indicate-that-the-monitor-is-disabled)
|
|
||
| const handleEnable = () => { | ||
| updateDetector({detectorId: detector.id, enabled: true}); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Unauthorized users see alert enable button.
The DisabledAlert component doesn't check user permissions before showing the enable button. The existing DisableDetectorAction uses useCanEditDetector to verify permissions, but DisabledAlert always displays the button when the detector is disabled, allowing users without alerts:write permission to attempt enabling detectors (which will fail at the API level, creating a confusing user experience).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, will add
…ls (#103165) Adds a reusable DisabledAlert component that displays a muted alert when a detector is disabled, with a one-click enable button. The alert automatically hides when the detector becomes enabled. Uptime detectors show: "This monitor is disabled and not recording uptime checks." Cron detectors show: "This monitor is disabled and not accepting check-ins." Fixes [NEW-565: Disabled monitors should show a indicator that disabling means not accepting check-ins](https://linear.app/getsentry/issue/NEW-565/disabled-monitors-should-show-a-indicator-that-disabling-means-not) Fixes [NEW-616: Indicate that the monitor is disabled](https://linear.app/getsentry/issue/NEW-616/indicate-that-the-monitor-is-disabled)
…ls (#103165) Adds a reusable DisabledAlert component that displays a muted alert when a detector is disabled, with a one-click enable button. The alert automatically hides when the detector becomes enabled. Uptime detectors show: "This monitor is disabled and not recording uptime checks." Cron detectors show: "This monitor is disabled and not accepting check-ins." Fixes [NEW-565: Disabled monitors should show a indicator that disabling means not accepting check-ins](https://linear.app/getsentry/issue/NEW-565/disabled-monitors-should-show-a-indicator-that-disabling-means-not) Fixes [NEW-616: Indicate that the monitor is disabled](https://linear.app/getsentry/issue/NEW-616/indicate-that-the-monitor-is-disabled)
Adds a reusable DisabledAlert component that displays a muted alert when
a detector is disabled, with a one-click enable button. The alert
automatically hides when the detector becomes enabled.
Uptime detectors show: "This monitor is disabled and not recording uptime checks."
Cron detectors show: "This monitor is disabled and not accepting check-ins."
Fixes NEW-565: Disabled monitors should show a indicator that disabling means not accepting check-ins
Fixes NEW-616: Indicate that the monitor is disabled