fix(ui): связывать OSPF узлы по подтверждённым ID
This commit is contained in:
1 parent
7a68ae8184
commit
259c5c3014
16 files changed
+123
-41
No files matched your search
@@ -22,7 +22,7 @@ export interface OspfRouteRow {
|
||||
id: string
|
||||
dataUnknown?: boolean
|
||||
destination: string
|
||||
type: "O" | "O IA" | "O E1" | "O E2"
|
||||
type: "O" | "O IA" | "O E1" | "O E2" | "Unknown"
|
||||
cost: number | null
|
||||
nextHop: string
|
||||
via: string
|
||||
@@ -32,6 +32,7 @@ export interface OspfRouteRow {
|
||||
}
|
||||
|
||||
function routeTypeClass(type: OspfRouteRow["type"]) {
|
||||
if (type === "Unknown") return "bg-muted text-muted-foreground border-border"
|
||||
if (type === "O") return "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/25"
|
||||
if (type === "O IA") return "bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/25"
|
||||
if (type === "O E1") return "bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/25"
|
||||
@@ -70,7 +71,7 @@ function OspfRoutesDataGrid({ routes, emptyTitle }: OspfRoutesDataGridProps) {
|
||||
routeTypeClass(row.original.type),
|
||||
)}
|
||||
>
|
||||
{row.original.type}
|
||||
{row.original.type === "Unknown" ? "Тип неизвестен" : row.original.type}
|
||||
</span>
|
||||
),
|
||||
meta: { headerTitle: "Тип", headerClassName: DATA_GRID_CELL_PAD, cellClassName: DATA_GRID_CELL_PAD },
|
||||
|
||||
Reference in new issue
Block a user