feat(api, web): enhance list entry management and UI consistency
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m57s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped

- Updated API to support structured list entry inputs, allowing for nested list references.
- Improved error handling for list operations to prevent cyclic references.
- Refactored UI components to ensure consistent labeling and navigation for IP lists.
- Enhanced list detail and catalog pages with better filtering and entry management features.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-07-20 23:25:05 +07:00
co-authored by Cursor
parent 3f7672ab7c
commit c505ab82e8
13 changed files with 952 additions and 518 deletions
+15 -2
View File
@@ -2,7 +2,11 @@ import { createHash } from 'node:crypto'
import type { Db } from '@evofw/db'
import { repos } from '@evofw/db'
import { refreshAllHostnameRules } from '../policy/resolve-hostname.js'
import { rebuildManualListEntries } from './entries.js'
import {
findParentListIds,
rebuildListCascade,
rebuildManualListEntries,
} from './entries.js'
function uniq(cidrs: string[]): string[] {
return [...new Set(cidrs.map((c) => c.trim()).filter(Boolean))].sort()
@@ -126,7 +130,16 @@ export async function refreshIpList(db: Db, listId: string): Promise<void> {
lastError: null,
})
repos.bumpAgentsForList(db, listId)
// Cascade to parents that nest this list (skip self rebuild for non-manual —
// CIDRs already replaced above).
if (list.type === 'static' || list.type === 'domains') {
await rebuildListCascade(db, listId)
} else {
repos.bumpAgentsForList(db, listId)
for (const parentId of findParentListIds(db, listId)) {
await rebuildListCascade(db, parentId)
}
}
} catch (err) {
repos.updateIpList(db, listId, {
lastError: err instanceof Error ? err.message : String(err),