From 458e01cf247b066019afbb12ff0897078469f1eb Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 2 Feb 2021 06:49:21 -0500 Subject: [PATCH] ui: use template strings when generating cross-segment report --- .../src/components/report-components/SecurityReport.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js index 9a4e2120a..f8c8fa192 100644 --- a/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js +++ b/monkey/monkey_island/cc/ui/src/components/report-components/SecurityReport.js @@ -451,7 +451,8 @@ class ReportPageComponent extends AuthComponent { } generateCrossSegmentIssue(crossSegmentIssue) { - let crossSegmentIssueOverview = 'Communication possible from ' + crossSegmentIssue['source_subnet'] + ' to ' + crossSegmentIssue['target_subnet'] + let crossSegmentIssueOverview = 'Communication possible from ' + + `${crossSegmentIssue['source_subnet']} to ${crossSegmentIssue['target_subnet']}`; return (
  • @@ -476,7 +477,7 @@ class ReportPageComponent extends AuthComponent { generateCrossSegmentSingleHostMessage(issue) { return (
  • - {'Machine ' + issue['hostname'] + ' has both ips: ' + issue['source'] + ' and ' + issue['target']} + {`Machine ${issue['hostname']} has both ips: ${issue['source']} and ${issue['target']}`}
  • ); } @@ -495,8 +496,8 @@ class ReportPageComponent extends AuthComponent { generateCrossSegmentServiceMessage(issue) { return ( - 'IP ' + issue['source'] + ' (' + issue['hostname'] + ') connected to IP ' + issue['target'] - + ' using the services: ' + Object.keys(issue['services']).join(', ') + `IP ${issue['source']} (${issue['hostname']}) connected to IP ${issue['target']}` + + ` using the services: ${Object.keys(issue['services']).join(', ')}` ); }