mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-08 05:39:49 -05:00
[PR #3011] Hide alerting UI when disable_enterprise_features is true #12057
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/3011
Author: @Copilot
Created: 5/6/2026
Status: 🔄 Open
Base:
main← Head:copilot/fix-create-alert-visibility📝 Commits (3)
0c643e9Initial plan1b183d3Hide alerting features when disable_enterprise_features is set3ac315bFix useEffect dependency array in create alert page📊 Changes
3 files changed (+37 additions, -10 deletions)
View changed files
📝
src/app/[orgId]/settings/alerting/create/page.tsx(+16 -1)📝
src/app/navigation.tsx(+9 -5)📝
src/components/AlertingRulesTable.tsx(+12 -4)📄 Description
With
disable_enterprise_features: true, the Alerting sidebar entry and "Create Alert Rule" page were still rendered (just grayed out), inconsistent with other enterprise features that are fully hidden under this flag.Changes
src/app/navigation.tsx: GatesidebarAlertingbehind!env?.flags.disableEnterpriseFeatures, matching the existing pattern forsidebarApprovals, access logs, etc.src/components/AlertingRulesTable.tsx: PassonAdd={undefined}when enterprise features are disabled, suppressing the "+ Create Alert" button.src/app/[orgId]/settings/alerting/create/page.tsx: Guard the create page — rendersnulland callsrouter.replaceback to the rules list if enterprise features are disabled, preventing direct URL access.Fixes #3009
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.