Redesign FiltersTab with active/inactive layout and assign/create dialogs (Tasks 2.3/2.4)
- Rewrite FiltersTab: use fetchFilters() for FilterConfig[] with embedded active
status; show 'Active — sshd, apache-auth' badge labels; FilterDetail sub-
component with source_file/override badges, FilterForm, Assign button, raw
config section
- New AssignFilterDialog: selects jail from enabled-jails list, calls
POST /config/jails/{name}/filter with optional fail2ban reload
- New CreateFilterDialog: name+failregex+ignoreregex form, calls
POST /config/filters, closes and selects new filter on success
- Extend ConfigListDetail: add listHeader (for Create button) and
itemBadgeLabel (for custom badge text) optional props
- Fix updateFilterFile bug: was PUT /config/filters/{name} (structured
endpoint), now correctly PUT /config/filters/{name}/raw
- Fix createFilterFile bug: was POST /config/filters, now POST /config/filters/raw
- Add updateFilter, createFilter, deleteFilter, assignFilterToJail to api/config.ts
- Add FilterUpdateRequest, FilterCreateRequest, AssignFilterRequest to types/config.ts
- Add configFiltersRaw, configJailFilter endpoints
- Tests: 24 new tests across FiltersTab, AssignFilterDialog, CreateFilterDialog
(all 89 frontend tests passing)
This commit is contained in:
@@ -160,7 +160,7 @@ fail2ban ships with a large collection of filter definitions in `filter.d/` (ove
|
||||
|
||||
---
|
||||
|
||||
### Task 2.3 — Frontend: Filters Tab with Active/Inactive Display and Activation
|
||||
### Task 2.3 — Frontend: Filters Tab with Active/Inactive Display and Activation ✅ DONE
|
||||
|
||||
**Goal:** Enhance the Filters tab in the Configuration page to show all filters with their active/inactive status and allow editing.
|
||||
|
||||
@@ -187,7 +187,7 @@ fail2ban ships with a large collection of filter definitions in `filter.d/` (ove
|
||||
|
||||
---
|
||||
|
||||
### Task 2.4 — Tests: Filter Discovery and Management
|
||||
### Task 2.4 — Tests: Filter Discovery and Management ✅ DONE
|
||||
|
||||
**Goal:** Test coverage for filter listing, editing, creation, and assignment.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user