feat(api): unify policy handling with default action updates
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m53s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped

- Updated `evofw-firewall.sh` and related scripts to replace `policy_mode` with `default_action`, enhancing clarity and consistency in policy management.
- Adjusted agent routes and evaluation logic to accommodate the new default action structure, ensuring backward compatibility with legacy modes.
- Enhanced tests to validate the new default action behavior and its integration within the agent policy framework.
- Refactored related components in the web interface to align with the updated policy handling, improving user experience and reducing confusion around policy modes.
This commit is contained in:
Denozordec
2026-07-23 10:52:28 +07:00
parent a6eb21a10d
commit 1f7273f38d
30 changed files with 1469 additions and 621 deletions
+1 -22
View File
@@ -9,7 +9,6 @@ import { PageHeader, PageShell, ResourcePage } from '@/components/reui-kit'
import { DataGridColumnHeader } from '@/components/reui/data-grid/data-grid-column-header'
import { DataGridPrimaryCell } from '@/components/data-grid-cell'
import { StatusBadge } from '@/components/status-badge'
import { Badge } from '@/components/reui/badge'
import { ConfirmDialog } from '@/components/confirm-dialog'
import { PolicySetIcon } from '@/components/rules/policy-set-icon'
import { policySetsQueryOptions } from '@/queries'
@@ -120,7 +119,7 @@ function PolicySetsPage() {
),
cell: ({ row }) => (
<div className="flex min-w-0 items-center gap-3">
<PolicySetIcon mode={row.original.policy_mode} />
<PolicySetIcon />
<DataGridPrimaryCell
accent="primary"
title={row.original.name}
@@ -140,26 +139,6 @@ function PolicySetsPage() {
/>
),
},
{
accessorKey: 'policy_mode',
header: ({ column }) => (
<DataGridColumnHeader column={column} title="Режим" />
),
cell: ({ row }) => (
<Badge
variant={
row.original.policy_mode === 'whitelist'
? 'warning-light'
: 'secondary'
}
size="sm"
>
{row.original.policy_mode === 'whitelist'
? 'whitelist'
: 'blacklist'}
</Badge>
),
},
{
accessorKey: 'rules_count',
header: ({ column }) => (