fix(bgp): сохранять неизвестные AS и тип сессии

This commit is contained in:
Denozordec committed 2026-09-30 17:09:32 +07:00
1 parent 2e17cbe926
commit 5c307a5b6c
9 files changed
+47 -21

No files matched your search

+2 -2
View File
@@ -5,8 +5,8 @@ const counter = z.number().int().nonnegative()
export const bgpSessionSchema = z.object({
id: z.string().trim().min(1), serverId: z.number().int().positive(),
serverName: z.string(), serverSite: z.string(), serverCountry: z.string(),
name: z.string(), peerIp: z.string(), remoteAs: counter, localAs: counter,
localId: z.string(), remoteId: z.string(), state: z.string().trim().min(1), type: z.enum(["eBGP", "iBGP"]),
name: z.string(), peerIp: z.string(), remoteAs: counter.nullable(), localAs: counter.nullable(),
localId: z.string(), remoteId: z.string(), state: z.string().trim().min(1), type: z.enum(["eBGP", "iBGP", "Unknown"]),
uptime: z.string().nullable(), holdTime: counter.nullable(), keepalive: counter.nullable(),
prefixesRx: counter.nullable(), prefixesTx: counter.nullable(), inputMessages: counter.nullable(), outputMessages: counter.nullable(),
afi: z.string().nullable().optional(),
+3 -3
View File
@@ -1,5 +1,5 @@
export type BgpState = "Established" | "Active" | "Idle" | "Connect" | "OpenSent" | "OpenConfirm" | "Unknown"
export type BgpType = "eBGP" | "iBGP"
export type BgpType = "eBGP" | "iBGP" | "Unknown"
export type BgpAfi = "IPv4 Unicast" | "IPv6 Unicast" | "VPNv4 Unicast"
export interface BgpSessionRow {
@@ -8,8 +8,8 @@ export interface BgpSessionRow {
serverLabel: string
serverSite: string
peerIp: string
remoteAs: number
localAs: number
remoteAs: number | null
localAs: number | null
routerId: string
description: string
state: BgpState