From 3603d210ffe1e11cbde4103d1f7b1082edee135f Mon Sep 17 00:00:00 2001 From: Dhayalan Date: Thu, 18 Apr 2019 21:07:17 +0200 Subject: [PATCH] Update ReportPage.js --- .../cc/ui/src/components/pages/ReportPage.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js index 754ded024..73bfd850d 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/ReportPage.js @@ -408,15 +408,17 @@ class ReportPageComponent extends AuthComponent { generateReportRecommendationsSection() { return (
- {Object.keys(this.state.report.recommendations.domain_issues).length !=0 ? -

Domain related recommendations

: null } - + {/* Checks if there are any domain issues. If there are more then one: render the title. Otherwise, + * don't render it (since the issues themselves will be empty. */} + {Object.keys(this.state.report.recommendations.domain_issues).length !== 0 ? +

Domain related recommendations

: null }
{this.generateIssues(this.state.report.recommendations.domain_issues)}
-

- Machine related Recommendations -

+ {/* Checks if there are any issues. If there are more then one: render the title. Otherwise, + * don't render it (since the issues themselves will be empty. */} + {Object.keys(this.state.report.recommendations.issues).length !== 0 ? +

Machine related recommendations

: null }
{this.generateIssues(this.state.report.recommendations.issues)}
@@ -424,6 +426,7 @@ class ReportPageComponent extends AuthComponent { ); } + generateReportGlanceSection() { let exploitPercentage = (100 * this.state.report.glance.exploited.length) / this.state.report.glance.scanned.length;