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