From 3fef55eefaf1b2fc6414a33b1db31257afee8cf2 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Thu, 22 Aug 2019 15:00:50 +0300 Subject: [PATCH] Now periodically updating the report. --- .../cc/ui/src/components/pages/ZeroTrustReportPage.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js b/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js index 2fe43c42e..989af82a8 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ZeroTrustReportPage.js @@ -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) {