lazy loading not exported routes is not supported for openbgpd right now

This commit is contained in:
Annika Hannig 2021-07-05 14:24:55 +02:00
parent 36d78f0e74
commit ad544243ae
No known key found for this signature in database
GPG Key ID: 62E226E47DDCE58D
2 changed files with 10 additions and 2 deletions

View File

@ -50,7 +50,8 @@ const QuickLinks = function(props) {
props.routes.received.totalResults > 0) &&
<li className="received">
<a href="#routes-received">Accepted</a></li>}
{showNotExported &&
{(!props.routes.notExported.loading &&
props.routes.notExported.totalResults > 0) &&
<li className="not-exported">
<a href="#routes-not-exported">Not Exported</a></li>}
</ul>

View File

@ -183,6 +183,7 @@ class RoutesView extends React.Component {
}
renderLoadTrigger() {
const rs = this.props.routeserver;
const type = this.props.type;
const state = this.props.routes[type];
const name = {
@ -191,6 +192,10 @@ class RoutesView extends React.Component {
[ROUTES_NOT_EXPORTED]: "routes-not-exported",
}[type];
// We do not support this with openbgpd based route servers.
if (rs && rs.type == "openbgpd") {
return null;
}
// This is an artificial delay, to make the user wait until
// filtered and recieved routes are fetched
@ -234,7 +239,8 @@ class RoutesView extends React.Component {
}
export default connect(
(state) => {
(state, ownProps) => {
const rs = state.routeservers.byId[ownProps.routeserverId];
const received = {
routes: state.routes.received,
requested: state.routes.receivedRequested,
@ -278,6 +284,7 @@ export default connect(
state.routes.notExportedFiltersApplied
);
return({
routeserver: rs,
filterQuery: state.routes.filterQuery,
routes: {
[ROUTES_RECEIVED]: received,