diff --git a/client/src/actions/index.js b/client/src/actions/index.js index 71fa352e..472ae31c 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -277,8 +277,6 @@ export const getDnsStatus = () => async (dispatch) => { const dnsStatus = await apiClient.getGlobalStatus(); dispatch(dnsStatusSuccess(dnsStatus)); dispatch(getVersion()); - dispatch(getClients()); - dispatch(getTopStats()); dispatch(getTlsStatus()); } catch (error) { dispatch(addErrorToast({ error })); diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index beae9e53..8a675a05 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -21,6 +21,7 @@ class Logs extends Component { componentDidMount() { this.getLogs(); this.props.getFilteringStatus(); + this.props.getClients(); } componentDidUpdate(prevProps) { @@ -356,6 +357,7 @@ Logs.propTypes = { processingRules: PropTypes.bool, logStatusProcessing: PropTypes.bool, t: PropTypes.func, + getClients: PropTypes.func.isRequired, }; export default withNamespaces()(Logs); diff --git a/client/src/components/Settings/Clients/index.js b/client/src/components/Settings/Clients/index.js index 2da04b27..dc82bd0f 100644 --- a/client/src/components/Settings/Clients/index.js +++ b/client/src/components/Settings/Clients/index.js @@ -10,6 +10,7 @@ import Loading from '../../ui/Loading'; class Clients extends Component { componentDidMount() { this.props.getClients(); + this.props.getTopStats(); } render() { @@ -63,6 +64,7 @@ Clients.propTypes = { addClient: PropTypes.func.isRequired, updateClient: PropTypes.func.isRequired, getClients: PropTypes.func.isRequired, + getTopStats: PropTypes.func.isRequired, topStats: PropTypes.object, }; diff --git a/client/src/containers/Clients.js b/client/src/containers/Clients.js index 920bba98..20f756d1 100644 --- a/client/src/containers/Clients.js +++ b/client/src/containers/Clients.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { getClients } from '../actions'; +import { getClients, getTopStats } from '../actions'; import { addClient, updateClient, deleteClient, toggleClientModal } from '../actions/clients'; import Clients from '../components/Settings/Clients'; @@ -14,6 +14,7 @@ const mapStateToProps = (state) => { const mapDispatchToProps = { getClients, + getTopStats, addClient, updateClient, deleteClient, diff --git a/client/src/containers/Logs.js b/client/src/containers/Logs.js index 13ca4258..57634a3c 100644 --- a/client/src/containers/Logs.js +++ b/client/src/containers/Logs.js @@ -1,5 +1,5 @@ import { connect } from 'react-redux'; -import { getLogs, toggleLogStatus, downloadQueryLog, getFilteringStatus, setRules, addSuccessToast } from '../actions'; +import { getLogs, toggleLogStatus, downloadQueryLog, getFilteringStatus, setRules, addSuccessToast, getClients } from '../actions'; import Logs from '../components/Logs'; const mapStateToProps = (state) => { @@ -15,6 +15,7 @@ const mapDispatchToProps = { getFilteringStatus, setRules, addSuccessToast, + getClients, }; export default connect(