From 8c428da6353c524c9590d982ce86a15732a3cabf Mon Sep 17 00:00:00 2001 From: Jonathan Lassoff Date: Sat, 17 Feb 2024 22:11:48 -0800 Subject: [PATCH] Regroup and style idle connections --- ui/src/app/components/neighbors/Neighbors.js | 4 ++-- ui/src/app/components/neighbors/NeighborsTable.js | 8 ++++---- ui/src/scss/components/neighbors.scss | 4 ++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ui/src/app/components/neighbors/Neighbors.js b/ui/src/app/components/neighbors/Neighbors.js index 740c8caf..2593177a 100644 --- a/ui/src/app/components/neighbors/Neighbors.js +++ b/ui/src/app/components/neighbors/Neighbors.js @@ -87,9 +87,9 @@ const Neighbors = () => { let s = n.state.toLowerCase(); if (s.includes("up") || s.includes("established") ) { up.push(n); - } else if (s.includes("down")) { + } else if (s.includes("down") || s.includes("start") || s.includes("active") || s.includes("connect")) { down.push(n); - } else if (s.includes("start") || s.includes("active") || s.includes("idle") || s.includes("connect")) { + } else if (s.includes("idle")) { idle.push(n); } else { console.error("Couldn't classify neighbor by state:", n); diff --git a/ui/src/app/components/neighbors/NeighborsTable.js b/ui/src/app/components/neighbors/NeighborsTable.js index 3c751c0c..c8337442 100644 --- a/ui/src/app/components/neighbors/NeighborsTable.js +++ b/ui/src/app/components/neighbors/NeighborsTable.js @@ -123,14 +123,14 @@ const Section = ({state}) => { sectionTitle = 'BGP Sessions Established'; sectionCls += 'established '; break; + case 'idle': + sectionTitle = 'Idle BGP Sessions'; + sectionCls += 'idle '; + break; case 'down': sectionTitle = 'BGP Sessions Down'; sectionCls += 'down '; break; - case 'start': - sectionTitle = 'BGP Sessions Start'; - sectionCls += ''; - break; default: } return (

{sectionTitle}

); diff --git a/ui/src/scss/components/neighbors.scss b/ui/src/scss/components/neighbors.scss index c067215c..307418d6 100644 --- a/ui/src/scss/components/neighbors.scss +++ b/ui/src/scss/components/neighbors.scss @@ -52,5 +52,9 @@ &.down { color: red; } + + &.idle { + color: orange; + } }