fix(ui): сохранять BGP-сессии при частичных отказах
This commit is contained in:
1 parent
85e701960e
commit
7046808429
8 files changed
+181
-119
No files matched your search
@@ -22,6 +22,7 @@ import { fmtBgpNum } from "@/lib/bgp/helpers"
|
||||
import { ChevronDownIcon, ChevronRightIcon, NetworkIcon } from "lucide-react"
|
||||
|
||||
const STATE_STYLE: Record<BgpState, { bg: string; text: string; dot: string; label: string }> = {
|
||||
Unknown: { bg: "bg-muted", text: "text-muted-foreground", dot: "bg-muted-foreground", label: "Неизвестно" },
|
||||
Established: {
|
||||
bg: "bg-emerald-500/10",
|
||||
text: "text-emerald-600 dark:text-emerald-400",
|
||||
@@ -100,9 +101,10 @@ function TypeBadge({ type }: { type: BgpType }) {
|
||||
|
||||
interface BgpSessionsDataGridProps {
|
||||
sessions: BgpSessionRow[]
|
||||
emptyTitle?: string
|
||||
}
|
||||
|
||||
function BgpSessionsDataGrid({ sessions }: BgpSessionsDataGridProps) {
|
||||
function BgpSessionsDataGrid({ sessions, emptyTitle }: BgpSessionsDataGridProps) {
|
||||
const columns = useMemo<ColumnDef<DataGridFeatures, BgpSessionRow>[]>(
|
||||
() => [
|
||||
{
|
||||
@@ -272,7 +274,7 @@ function BgpSessionsDataGrid({ sessions }: BgpSessionsDataGridProps) {
|
||||
return (
|
||||
<EmptyState
|
||||
icon={<NetworkIcon className="size-4" />}
|
||||
title="Нет BGP-сессий"
|
||||
title={emptyTitle ?? "Нет BGP-сессий"}
|
||||
description="Измените фильтры или проверьте подключение к роутерам"
|
||||
className="border-0 py-10"
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user