Docker images / prepare-release (push) Successful in 7s
Docker images / backend-test (push) Successful in 1m40s
Docker images / frontend-image (push) Successful in 2m50s
Docker images / updater-image (push) Successful in 42s
Docker images / backend-image (push) Successful in 2m40s
Docker images / notify-webhook (push) Skipped
Docker images / publish-release (push) Successful in 10s
- Added support for fetching and displaying server data in BGP, VXLAN, and OSPF pages, improving the overall user experience. - Introduced new backend routes for OSPF and VXLAN, allowing for better data management and retrieval. - Implemented mapping functions for backend server data to frontend types, ensuring consistency across components. - Enhanced the sidebar to display counts for BGP sessions, VXLAN tunnels, and containers, providing users with quick insights into their network status. - Updated tests to cover new functionalities and ensure reliability. Co-authored-by: Cursor <[email protected]>
44 lines
988 B
TypeScript
44 lines
988 B
TypeScript
import assert from "node:assert/strict"
|
|
import { mapVxlanRow } from "./vxlan-live.js"
|
|
|
|
const server = {
|
|
id: 7,
|
|
name: "mt-msk",
|
|
host: "10.0.0.1",
|
|
site: "MSK",
|
|
country: "RU",
|
|
} as Parameters<typeof mapVxlanRow>[0]
|
|
|
|
const row = mapVxlanRow(
|
|
server,
|
|
{
|
|
".id": "*3",
|
|
name: "vxlan-10",
|
|
vni: "10010",
|
|
port: "8472",
|
|
"local-address": "10.0.0.1",
|
|
running: "true",
|
|
disabled: "false",
|
|
l2mtu: "1500",
|
|
"mac-learning": "true",
|
|
"arp-proxy": "true",
|
|
comment: "overlay",
|
|
},
|
|
[
|
|
{ interface: "vxlan-10", "remote-ip": "10.0.1.1" },
|
|
{ interface: "other", "remote-ip": "1.1.1.1" },
|
|
{ interface: "vxlan-10", "remote-ip": "10.0.2.1" },
|
|
],
|
|
0,
|
|
)
|
|
|
|
assert.equal(row.serverId, "7")
|
|
assert.equal(row.vni, 10010)
|
|
assert.equal(row.dstPort, 8472)
|
|
assert.equal(row.status, "up")
|
|
assert.equal(row.enabled, true)
|
|
assert.deepEqual(row.remoteVteps, ["10.0.1.1", "10.0.2.1"])
|
|
assert.equal(row.vtepIp, "10.0.0.1")
|
|
|
|
console.log("vxlan-live.test.ts: ok")
|