diff --git a/client/assets/scss/components/communities.scss b/client/assets/scss/components/communities.scss index d4b41b0..9e492d4 100644 --- a/client/assets/scss/components/communities.scss +++ b/client/assets/scss/components/communities.scss @@ -4,5 +4,11 @@ .label-bgp-community { margin-right: 5px; + display: inline-block; +} + +.label-bgp-unknown { + color: #333; + background-color: #ddd; } diff --git a/client/components/bgp-communities/label.jsx b/client/components/bgp-communities/label.jsx index e6ec2d2..952b64e 100644 --- a/client/components/bgp-communities/label.jsx +++ b/client/components/bgp-communities/label.jsx @@ -5,15 +5,20 @@ import {connect} from 'react-redux' class Label extends React.Component { render() { - console.log(this.props.communities, this.props.community); // Lookup communities const readableCommunity = this.props.communities[this.props.community]; + let cls = 'label label-bgp-community '; if (!readableCommunity) { - return null; + cls += "label-bgp-unknown"; + // Default label + return ( + {this.props.community} + ); } - let cls = 'label label-success label-bgp-community '; - return ({readableCommunity}); + cls += "label-success "; + // Split community into components + return ({readableCommunity} ({this.props.community})); } } diff --git a/client/components/routeservers/routes/bgp-attributes-modal.jsx b/client/components/routeservers/routes/bgp-attributes-modal.jsx index 6e7ba0d..d0c3b72 100644 --- a/client/components/routeservers/routes/bgp-attributes-modal.jsx +++ b/client/components/routeservers/routes/bgp-attributes-modal.jsx @@ -72,11 +72,6 @@ class BgpAttributesModal extends React.Component { {communities.length > 0 &&