fix(ui): сохранять BGP-сессии при частичных отказах

This commit is contained in:
Denozordec committed 2026-09-30 16:48:46 +07:00
1 parent 85e701960e
commit 7046808429
8 files changed
+181 -119

No files matched your search

+2 -2
View File
@@ -23,9 +23,9 @@ async function setup(page: Page, path: string, empty = false) {
await page.route("**/api/**", route => {
const path = new URL(route.request().url()).pathname
const json = path === "/api/ospf/all" ? (empty ? { instances: [], interfaces: [], neighbors: [], routes: [], bfdSessions: [] } : ospf)
: path === "/api/bgp/sessions" ? (empty ? [] : bgp)
: path === "/api/bgp/catalog" ? { sessions: empty ? [] : bgp, failures: [] }
: path === "/api/auth/config" ? { required: false }
: path === "/api/servers" ? [] : {}
: path === "/api/servers" ? [{ id: 1, name: "Тестовый роутер", host: "192.0.2.100", country: "RU", enabled: true, status: null }] : {}
return route.fulfill({ json })
})
await page.goto(path)