feat(api, web): enhance EvoBGP community handling and UI integration
- 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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user