forked from p15670423/monkey
cc: Add dummy code to frontend to check if ransomware report tab should be showed
This commit is contained in:
parent
2f090f0060
commit
231fa6f99f
|
@ -59,8 +59,7 @@ class ReportPageComponent extends AuthComponent {
|
|||
this.setState({zeroTrustReport: ztReport})
|
||||
});
|
||||
this.setState({
|
||||
ransomwareReport: {'report': '',
|
||||
'show': true}})
|
||||
ransomwareReport: {'report': ''}})
|
||||
// this.authFetch('/api/report/ransomware')
|
||||
// .then(res => res.json())
|
||||
// .then(res => {
|
||||
|
@ -68,7 +67,7 @@ class ReportPageComponent extends AuthComponent {
|
|||
// ransomwareReport: res
|
||||
// });
|
||||
// });
|
||||
if (this.state.ransomwareReport['show'] === true) {
|
||||
if (this.shouldShowRansomwareReport(this.state.ransomwareReport)) {
|
||||
this.state.sections.push({key: 'ransomware', title: 'Ransomware report'})
|
||||
}
|
||||
}
|
||||
|
@ -99,6 +98,12 @@ class ReportPageComponent extends AuthComponent {
|
|||
return ztReport
|
||||
};
|
||||
|
||||
shouldShowRansomwareReport(report) { // TODO: Add proper check
|
||||
if (report) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
clearInterval(this.state.ztReportRefreshInterval);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue