From d5b659c3cdf91d07895a9381a0367890095f2e8f Mon Sep 17 00:00:00 2001
From: Ace Pace
Date: Wed, 29 Apr 2020 18:48:29 +0300
Subject: [PATCH] Change to deep linking forteawesome images. This is because
webpack doesn't seem to minimize the imports properly. Saves 80kb
---
monkey/monkey_island/cc/ui/src/components/Main.js | 3 ++-
.../cc/ui/src/components/attack/ConfigMatrixComponent.js | 4 ++--
.../cc/ui/src/components/map/preview-pane/PreviewPane.js | 2 +-
.../monkey_island/cc/ui/src/components/pages/MapPage.js | 3 ++-
.../cc/ui/src/components/pages/RunMonkeyPage.js | 6 ++++--
.../ui/src/components/report-components/AttackReport.js | 5 ++++-
.../ui/src/components/report-components/SecurityReport.js | 2 +-
.../report-components/attack/SelectedTechnique.js | 2 +-
.../report-components/attack/TechniqueDropdowns.js | 5 ++++-
.../report-components/zerotrust/EventsButton.js | 2 +-
.../report-components/zerotrust/ExportEventsButton.js | 2 +-
.../components/report-components/zerotrust/PillarLabel.js | 8 +++++++-
.../report-components/zerotrust/ReportLegend.js | 2 +-
.../components/report-components/zerotrust/StatusLabel.js | 5 ++++-
.../cc/ui/src/components/side-menu/VersionComponent.js | 2 +-
15 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/monkey/monkey_island/cc/ui/src/components/Main.js b/monkey/monkey_island/cc/ui/src/components/Main.js
index b4325e55c..67eb409c3 100644
--- a/monkey/monkey_island/cc/ui/src/components/Main.js
+++ b/monkey/monkey_island/cc/ui/src/components/Main.js
@@ -2,7 +2,8 @@ import React from 'react';
import {BrowserRouter as Router, NavLink, Redirect, Route, Switch} from 'react-router-dom';
import {Col, Grid, Row} from 'react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faCheck, faUndo } from '@fortawesome/free-solid-svg-icons'
+import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck'
+import { faUndo } from '@fortawesome/free-solid-svg-icons/faUndo'
import RunServerPage from 'components/pages/RunServerPage';
import ConfigurePage from 'components/pages/ConfigurePage';
diff --git a/monkey/monkey_island/cc/ui/src/components/attack/ConfigMatrixComponent.js b/monkey/monkey_island/cc/ui/src/components/attack/ConfigMatrixComponent.js
index d6fd2d12a..75c2a2106 100644
--- a/monkey/monkey_island/cc/ui/src/components/attack/ConfigMatrixComponent.js
+++ b/monkey/monkey_island/cc/ui/src/components/attack/ConfigMatrixComponent.js
@@ -8,8 +8,8 @@ import '../../styles/Tooltip.scss';
import {Col} from 'react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { faCircle as faCircle } from '@fortawesome/free-solid-svg-icons';
-import { faCircle as faCircleThin } from '@fortawesome/free-regular-svg-icons';
+import { faCircle as faCircle } from '@fortawesome/free-solid-svg-icons/faCircle';
+import { faCircle as faCircleThin } from '@fortawesome/free-regular-svg-icons/faCircle';
class ConfigMatrixComponent extends AuthComponent {
constructor(props) {
diff --git a/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js b/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js
index dd99c8503..4f37b5fd6 100644
--- a/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js
+++ b/monkey/monkey_island/cc/ui/src/components/map/preview-pane/PreviewPane.js
@@ -1,6 +1,6 @@
import React from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faHandPointLeft } from '@fortawesome/free-solid-svg-icons'
+import { faHandPointLeft } from '@fortawesome/free-solid-svg-icons/faHandPointLeft'
import Toggle from 'react-toggle';
import {OverlayTrigger, Tooltip} from 'react-bootstrap';
import download from 'downloadjs'
diff --git a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js
index 3839e55fd..997a2ae4c 100644
--- a/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js
+++ b/monkey/monkey_island/cc/ui/src/components/pages/MapPage.js
@@ -2,7 +2,8 @@ import React from 'react';
import {Col, Modal} from 'react-bootstrap';
import {Link} from 'react-router-dom';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faStopCircle, faMinus } from '@fortawesome/free-solid-svg-icons'
+import { faStopCircle } from '@fortawesome/free-solid-svg-icons/faStopCircle'
+import { faMinus } from '@fortawesome/free-solid-svg-icons/faMinus'
import PreviewPaneComponent from 'components/map/preview-pane/PreviewPane';
import {ReactiveGraph} from 'components/reactive-graph/ReactiveGraph';
import {getOptions, edgeGroupToColor} from 'components/map/MapOptions';
diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js
index 2c07147f7..ae1ff962f 100644
--- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js
+++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js
@@ -5,7 +5,9 @@ import CopyToClipboard from 'react-copy-to-clipboard';
import GridLoader from 'react-spinners/GridLoader';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { faClipboard, faCheck, faSync } from '@fortawesome/free-solid-svg-icons';
+import { faClipboard } from '@fortawesome/free-solid-svg-icons/faClipboard';
+import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
+import { faSync } from '@fortawesome/free-solid-svg-icons/faSync';
import {Link} from 'react-router-dom';
import AuthComponent from '../AuthComponent';
@@ -327,7 +329,7 @@ class RunMonkeyPageComponent extends AuthComponent {
Choose the operating system where you want to run the monkey
{this.state.ips.length > 1 ? ', and the interface to communicate with.' : '.'}
-