-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
Display all rules in a table fetched via GET /rules/{client_id}. Supports per-row subscribe toggle, edit, delete, checkbox selection (activating bulk actions from header bar ticket), and search filtering. This is the core interactive view of the Notification Rules page.
Acceptance Criteria
- Table displays columns: checkbox, Rule (expr), Applied To (topic), Uploaded By (stub "-"), Description (stub "-"), Subscribed (toggle), edit icon, delete icon
- Subscribe toggle calls
POST /rules/subscribe; toggle off is stub with TODO (no unsubscribe endpoint yet) - Edit icon opens dialog for
expranddebounce_time, callsPUT /rules/edit/{rule_id} - Delete icon calls
POST /rules/delete/{rule_id}with confirmation - "All" checkbox and individual checkboxes populate
selectedRules, enabling header bar bulk actions - Search filters rows client-side by expr, topic, or description
- Empty state when no rules exist
Proposed Solution
Use PrimeNG TableModule with selectionMode="checkbox" (reference fault-page table patterns). Fetch on init via APIService.query(() => getAllRulesWithClientInfo(clientId), { queryKey: ['rules'] }). Subscribed toggle via PrimeNG InputSwitch bound to is_subscribed. Edit dialog reuses DynamicDialog. Bulk Remove iterates selected rules calling delete per rule. Bulk Toggle Subscription calls POST /rules/subscribe with selected IDs. TODO for unsubscribe. Uploaded By and Description columns show "-" with TODO comments for backend support.
Mocks
Metadata
Metadata
Assignees
Labels
Type
Projects
Status