From 7e91459cd608bf76c3bdaf8b49ddde879cbfbab3 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:52:14 +0200 Subject: [PATCH] feat(ui/alerts): RulesListPage with enable/disable, delete, env promotion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Promotion dropdown builds a /alerts/rules/new URL with promoteFrom, ruleId, and targetEnv query params — the wizard will read these in Task 24 and pre-fill the form with source-env prefill + client-side warnings. --- ui/src/pages/Alerts/RulesListPage.tsx | 114 +++++++++++++++++++++++++- 1 file changed, 113 insertions(+), 1 deletion(-) diff --git a/ui/src/pages/Alerts/RulesListPage.tsx b/ui/src/pages/Alerts/RulesListPage.tsx index ee769393..cdd2bd6a 100644 --- a/ui/src/pages/Alerts/RulesListPage.tsx +++ b/ui/src/pages/Alerts/RulesListPage.tsx @@ -1,3 +1,115 @@ +import { Link, useNavigate } from 'react-router'; +import { Button, SectionHeader, Toggle, useToast, Badge } from '@cameleer/design-system'; +import { PageLoader } from '../../components/PageLoader'; +import { SeverityBadge } from '../../components/SeverityBadge'; +import { + useAlertRules, + useDeleteAlertRule, + useSetAlertRuleEnabled, + type AlertRuleResponse, +} from '../../api/queries/alertRules'; +import { useEnvironments } from '../../api/queries/admin/environments'; +import { useSelectedEnv } from '../../api/queries/alertMeta'; +import sectionStyles from '../../styles/section-card.module.css'; + export default function RulesListPage() { - return
No rules yet. Create one to start evaluating alerts for this environment.
+ ) : ( +| Name | +Kind | +Severity | +Enabled | +Targets | ++ |
|---|---|---|---|---|---|
| {r.name} | +
+ |
+ {r.targets.length} | ++ {otherEnvs.length > 0 && ( + + )} + + | +