show related peers
This commit is contained in:
parent
c52da9e4a4
commit
21897615ca
@ -157,3 +157,58 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Related Peers
|
||||
*/
|
||||
.related-peers {
|
||||
$tabHeight: 23px;
|
||||
$shadowOffset: 3px;
|
||||
|
||||
display: block;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
|
||||
padding: $shadowOffset $shadowOffset 0px $shadowOffset;
|
||||
margin: 0px;
|
||||
|
||||
list-style: none;
|
||||
|
||||
top: -$tabHeight - $shadowOffset;
|
||||
|
||||
li {
|
||||
height: $tabHeight;
|
||||
line-height: $tabHeight;
|
||||
|
||||
display: inline-block;
|
||||
|
||||
padding: 0px 5px;
|
||||
margin: 0px 10px 0px 0px;
|
||||
|
||||
border-bottom: 1px solid #ffffff;
|
||||
background: #ffffff;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
|
||||
box-shadow: 0px 1px 3px #aaa;
|
||||
|
||||
&.active {
|
||||
font-weight: bold;
|
||||
a {
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
|
||||
a, a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.has-related-peers {
|
||||
.details-main {
|
||||
padding-top: 21px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -204,7 +204,8 @@ export default connect(
|
||||
// Find related peers. Peers belonging to the same AS.
|
||||
let relatedPeers = [];
|
||||
if (neighbor) {
|
||||
relatedPeers = _.where(neighbors, {asn: neighbor.asn});
|
||||
relatedPeers = _.where(neighbors, {asn: neighbor.asn,
|
||||
state: "up"});
|
||||
}
|
||||
|
||||
let received = {
|
||||
|
@ -9,6 +9,9 @@ import {makePeerLinkProps} from './urls'
|
||||
* Render related peers as tabs
|
||||
*/
|
||||
export default function RelatedPeers(props) {
|
||||
if (props.peers.length < 2) {
|
||||
return null; // Nothing to do here.
|
||||
}
|
||||
|
||||
const peers = props.peers.map((p) => (
|
||||
<li key={p.id}
|
||||
|
Loading…
x
Reference in New Issue
Block a user