1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
2017-05-16 13:34:00 +02:00

45 lines
738 B
JavaScript

/*
* Bird status
*/
import React from 'react'
import {connect} from 'react-redux'
// Actions
import {loadRouteserverStatus}
from 'components/routeservers/actions'
class Status extends React.Component {
componentDidMount() {
this.props.dispatch(
loadRouteserverStatus(this.props.routeserverId)
);
}
render() {
let rsStatus = this.props.details[this.props.routeserverId];
if (!rsStatus) {
return null;
}
return (
<div className="routeserver-status">
<div className="bird-version">
Bird {rsStatus.version}
</div>
</div>
);
}
}
export default connect(
(state) => {
return {
details: state.routeservers.details
}
}
)(Status);