Now periodically updating the report.

This commit is contained in:
Shay Nehmad 2019-08-22 15:00:50 +03:00
parent bf417ab01d
commit 3fef55eefa
1 changed files with 6 additions and 1 deletions

View File

@ -25,7 +25,8 @@ class ZeroTrustReportPageComponent extends AuthComponent {
} }
componentDidMount() { componentDidMount() {
this.updateMonkeysRunning().then(res => this.getZeroTrustReportFromServer(res)); this.updatePageState();
setInterval(this.updatePageState, 8000)
} }
updateMonkeysRunning = () => { updateMonkeysRunning = () => {
@ -37,6 +38,10 @@ class ZeroTrustReportPageComponent extends AuthComponent {
}); });
}; };
updatePageState = () => {
this.updateMonkeysRunning().then(res => this.getZeroTrustReportFromServer(res));
};
render() { render() {
let content; let content;
if (this.state.runStarted) { if (this.state.runStarted) {