import React, { Component } from 'react'; import { connect } from 'react-redux'; import moment from 'moment'; import { formatBitrate } from '../bitrate'; import { ws_disconnect } from '../socket'; import DateDisplay from './date'; import Ratio from './ratio'; import Throttle from './throttle'; import { updateResource } from '../actions/resources'; function Server({ server, dispatch }) { if (!server.id) { return null; } return (

Synapse

Running since
Current network use
{`${ formatBitrate(server.rate_up) } up, ${ formatBitrate(server.rate_down) } down`}
Global download throttle
dispatch(updateResource({ id: server.id, throttle_down }))} />
Global upload throttle
dispatch(updateResource({ id: server.id, throttle_up }))} />
Lifetime ratio
Session ratio
); } export default connect(state => ({ server: state.server }))(Server);