Repository navigation
[2.1] Fixes #38280: Show when an alert is disabled and not running (backport 2.1 #38286) - #38588
Conversation
* Report nothing pending for a disabled alert * Cover alerts created disabled with a position an older release wrote * Share the read-nothing progress and test the no-row read * Keep the raw alert offset getter Collate tests read * Say a disabled alert is not running and report its stored offsets * Show when an alert is disabled and not running * Map the notification list page to its alert specs * Describe the status row neutrally and test each disabled alert screen * Organise the alert badge imports * Show alert status in a column and switch alerts on or off from the form * Show a disabled alert's description as a preview instead of a locked editor * Organise the alert status and switch imports * Format the alert form fields and map the enabled switch to its spec * Show alert status as a dot badge, green for active and gray for disabled * Turn the alert Enabled switch into a settings row whose description explains the state * Close the profile source picker from the start of the header subtitle * Follow the helper placement, core styling and permission test rules in the alert UI * Lock a switched-off alert only when editing it and drop permission checks the entry points already make
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🟡 Medium riskAdding controls to disable and re-enable event alerts could stop configured notifications until an alert is switched back on. Backports the alert disabled-state UI to 2.1: a Status column in alert lists, a "Not running" Pending count and Status row for disabled alerts, and an Enabled toggle in alert forms. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Issue
Cherry-pick of #38286 to
2.1(Fixes #38280). The change is identical: the backport has the same patch id as the commit merged onmain, and it applied with no conflicts.Why 2.1 needs it
The backend half, #38279, is already on
2.1through #38555. Since then a disabled alert reports 0 pending events and the API returnsenabled, but the 2.1 UI does not show either, and there is still no way to switch an alert off or on from it. This brings the UI in line with the backend.What this PR changes
It reuses the alert's
enabledfield and the coreCard,ToggleandBadgeWithDot, which2.1already ships. Five translation keys are new, translated in every locale.Tests
The tests come with the cherry-pick unchanged: unit tests for the new components, the lists, the diagnostics, all form variants and the field-access helper, and a Playwright step in
ObservabilityAlerts.spec.tsthat switches an alert off from its form, saves, then switches it back on.Run locally on
2.1with the backport: the 16 test files it changes pass (344 tests). ESLint reports no errors;yarn tsc:checkreports no error in this PR's files (the existing ones on2.1are inOMSelectWidget.tsxandSSOUtils.test.ts). Playwright was not run locally.