fix(bgp): сохранять неизвестные AS и тип сессии
This commit is contained in:
1 parent
2e17cbe926
commit
5c307a5b6c
9 files changed
+47
-21
No files matched your search
@@ -62,6 +62,7 @@ const STATE_STYLE: Record<BgpState, { bg: string; text: string; dot: string; lab
|
||||
}
|
||||
|
||||
const TYPE_STYLE: Record<BgpType, { bg: string; text: string }> = {
|
||||
Unknown: { bg: "bg-muted", text: "text-muted-foreground" },
|
||||
eBGP: { bg: "bg-blue-500/10", text: "text-blue-600 dark:text-blue-400" },
|
||||
iBGP: { bg: "bg-purple-500/10", text: "text-purple-600 dark:text-purple-400" },
|
||||
}
|
||||
@@ -94,7 +95,7 @@ function TypeBadge({ type }: { type: BgpType }) {
|
||||
"border-current/20",
|
||||
)}
|
||||
>
|
||||
{type}
|
||||
{type === "Unknown" ? "Тип неизвестен" : type}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
@@ -154,8 +155,8 @@ function BgpSessionsDataGrid({ sessions, emptyTitle, selectedSessionId, onSelect
|
||||
const as = row.original.remoteAs
|
||||
return (
|
||||
<div className="flex items-center gap-1.5 font-mono">
|
||||
<span>AS{as}</span>
|
||||
{BGP_AS_NAMES[as] && (
|
||||
<span>{as === null ? "AS неизвестна" : "AS" + as}</span>
|
||||
{as !== null && BGP_AS_NAMES[as] && (
|
||||
<span className="text-muted-foreground text-[10px]">{BGP_AS_NAMES[as]}</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user