feat(api, web): enhance EvoBGP community handling and UI integration
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m42s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped

- Introduced a new function to resolve EvoBGP community IDs, allowing for better handling of legacy labels and UUIDs.
- Updated `fetchEvobgpCommunity` to return both resolved community IDs and CIDRs, improving data retrieval.
- Enhanced the ListsPage component to manage community IDs separately from user input, ensuring accurate configuration during list creation.
- Updated documentation to reflect changes in community ID resolution and integration with the UI.

This update improves the user experience by ensuring that community IDs are correctly resolved and stored, facilitating smoother interactions with the EvoBGP API.
This commit is contained in:
Denozordec
2026-07-23 11:30:56 +07:00
parent 1f7273f38d
commit fac2ed4d2d
3 changed files with 101 additions and 15 deletions
+7 -3
View File
@@ -13,14 +13,18 @@ EvoFirewall использует EvoBGP как **источник префикс
При refresh списка `evobgp_community`:
1. `GET {api}/v1/communities/{id}/prefixes?limit=5000`
2. Ответ: `{ items: [{ prefix }], prefixes: string[], has_more, next_cursor }`
3. Entries заменяются; generation агентов с правилами на этот list бампится
1. Если `config.community_id` не UUID (legacy: Autocomplete сохранил label) — resolve через `GET /v1/communities`
2. `GET {api}/v1/communities/{id}/prefixes?limit=5000` (id — UUID; EvoBGP также принимает community/label)
3. Ответ: `{ items: [{ prefix }], prefixes: string[], has_more, next_cursor }`
4. Entries заменяются; generation агентов с правилами на этот list бампится
5. В config пишется resolved UUID, если был label
## Autocomplete в UI
`GET /api/v1/integrations/evobgp/communities` — proxy к EvoBGP `GET /v1/communities?limit=200` (нужны settings выше).
В форме создания списка Base UI Autocomplete показывает label, а в `config.community_id` сохраняется UUID.
## Список
Создайте IP list type `evobgp_community` с `config.community_id`. Cron / кнопка Refresh обновляет entries.