Skip to content

Commit

Permalink
Merge branch 'jof/bgplgd-neighbor-states' into jof/sfmix
Browse files Browse the repository at this point in the history
  • Loading branch information
jof committed Feb 19, 2024
2 parents ca24c09 + 8c428da commit 970ee5e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ui/src/app/components/neighbors/Neighbors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions ui/src/app/components/neighbors/NeighborsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<p className={sectionCls}>{sectionTitle}</p>);
Expand Down
4 changes: 4 additions & 0 deletions ui/src/scss/components/neighbors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@
&.down {
color: red;
}

&.idle {
color: orange;
}
}

0 comments on commit 970ee5e

Please sign in to comment.