Add refresh button to querylog page

Closes 
This commit is contained in:
Ildar Kamalov 2018-09-17 17:44:32 +03:00
parent c2aa39efe5
commit df12038f33
2 changed files with 28 additions and 12 deletions
client/src/components/Dashboard

View file

@ -13,10 +13,14 @@ import Loading from '../ui/Loading';
class Dashboard extends Component {
componentDidMount() {
this.getAllStats();
}
getAllStats = () => {
this.props.getStats();
this.props.getStatsHistory();
this.props.getTopStats();
}
};
render() {
const { dashboard } = this.props;
@ -26,8 +30,8 @@ class Dashboard extends Component {
dashboard.processingStatsHistory ||
dashboard.processingTopStats;
const refreshFullButton = <button type="button" className="btn btn-outline-primary btn-sm" onClick={() => this.componentDidMount()}>Refresh statistics</button>;
const refreshButton = <button type="button" className="btn btn-outline-primary btn-sm card-refresh" onClick={() => this.componentDidMount()}></button>;
const refreshFullButton = <button type="button" className="btn btn-outline-primary btn-sm" onClick={() => this.getAllStats()}>Refresh statistics</button>;
const refreshButton = <button type="button" className="btn btn-outline-primary btn-sm card-refresh" onClick={() => this.getAllStats()} />;
return (
<Fragment>