2026-05-15 14:23:09 -07:00
|
|
|
const BASE = '/exabgp/api'
|
Add Phase 2: Vue 3 control panel, 6 learning dashboards, new BGP scenarios
- exabgp-ui/: Vue 3 + Vite SPA served by NGINX on :5001; proxies /api/ to
ExaBGP Flask on :5050; includes StatusBar, ScenarioPanel, RouteTable,
AnnounceForm, PeerStatus, ChurnControl components
- docker-compose.yml: add obmp-exabgp-ui service (host network, port 5001)
- exabgp/scenarios/__init__.py: add convergence_test, route_leak,
hijack_simulation scenarios for structured BGP learning exercises
- exabgp/inject.py: add 'peers' and 'monitor' subcommands; live-refresh
terminal status view with ANSI cursor repositioning
- obmp-grafana/dashboards/Learning/: 6 new OBMP-Learning dashboards
(update rate, peer health, AS path, RPKI, churn, attributes)
- obmp-grafana/provisioning/dashboards/openbmp-dashboards.yml: add
OpenBMP-Learning folder provider pointing to dashboards/Learning/
- DOCS.md: document Web UI, 3 new scenarios, 6 learning dashboards;
fix section numbering (10-14) and architecture diagram (23 dashboards)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 15:37:16 -07:00
|
|
|
|
|
|
|
|
async function req(method, path, body) {
|
|
|
|
|
const opts = { method, headers: { 'Content-Type': 'application/json' } }
|
|
|
|
|
if (body) opts.body = JSON.stringify(body)
|
|
|
|
|
const r = await fetch(BASE + path, opts)
|
|
|
|
|
if (!r.ok) throw new Error(`${method} ${path} → ${r.status}`)
|
|
|
|
|
return r.json()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const api = {
|
|
|
|
|
health: () => req('GET', '/healthz'),
|
|
|
|
|
peers: () => req('GET', '/peers'),
|
|
|
|
|
routes: () => req('GET', '/routes'),
|
|
|
|
|
scenarios: () => req('GET', '/scenarios'),
|
|
|
|
|
loadScenario: name => req('POST', `/scenario/${name}`),
|
|
|
|
|
unloadScenario: name => req('DELETE', `/scenario/${name}`),
|
|
|
|
|
announce: payload => req('POST', '/announce', payload),
|
|
|
|
|
withdraw: prefixes => req('POST', '/withdraw', { prefixes }),
|
|
|
|
|
withdrawAll: () => req('POST', '/withdraw/all'),
|
2026-05-15 14:23:09 -07:00
|
|
|
fullTableStart: (count, batchSize) => req('POST', '/full-table/start', { count, batch_size: batchSize }),
|
|
|
|
|
fullTableStatus: () => req('GET', '/full-table/status'),
|
|
|
|
|
fullTableStop: () => req('POST', '/full-table/stop'),
|
Add Phase 2: Vue 3 control panel, 6 learning dashboards, new BGP scenarios
- exabgp-ui/: Vue 3 + Vite SPA served by NGINX on :5001; proxies /api/ to
ExaBGP Flask on :5050; includes StatusBar, ScenarioPanel, RouteTable,
AnnounceForm, PeerStatus, ChurnControl components
- docker-compose.yml: add obmp-exabgp-ui service (host network, port 5001)
- exabgp/scenarios/__init__.py: add convergence_test, route_leak,
hijack_simulation scenarios for structured BGP learning exercises
- exabgp/inject.py: add 'peers' and 'monitor' subcommands; live-refresh
terminal status view with ANSI cursor repositioning
- obmp-grafana/dashboards/Learning/: 6 new OBMP-Learning dashboards
(update rate, peer health, AS path, RPKI, churn, attributes)
- obmp-grafana/provisioning/dashboards/openbmp-dashboards.yml: add
OpenBMP-Learning folder provider pointing to dashboards/Learning/
- DOCS.md: document Web UI, 3 new scenarios, 6 learning dashboards;
fix section numbering (10-14) and architecture diagram (23 dashboards)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 15:37:16 -07:00
|
|
|
}
|