diff --git a/monkey/monkey_island/cc/ui/src/components/Main.tsx b/monkey/monkey_island/cc/ui/src/components/Main.tsx index ae9a46534..a8d78cdc9 100644 --- a/monkey/monkey_island/cc/ui/src/components/Main.tsx +++ b/monkey/monkey_island/cc/ui/src/components/Main.tsx @@ -23,9 +23,8 @@ import 'react-data-components/css/table-twbs.css'; import 'styles/App.css'; import 'react-toggle/style.css'; import 'react-table/react-table.css'; -import {StandardLayoutComponent} from './layouts/StandardLayoutComponent'; import LoadingScreen from './ui-components/LoadingScreen'; -import {DisabledSidebarLayoutComponent} from "./layouts/DisabledSidebarLayoutComponent"; +import SidebarLayoutComponent from "./layouts/SidebarLayoutComponent"; import {CompletedSteps} from "./side-menu/CompletedSteps"; import Timeout = NodeJS.Timeout; import IslandHttpClient from "./IslandHttpClient"; @@ -179,52 +178,53 @@ class AppComponent extends AuthComponent { ()}/> ()}/> {this.renderRoute(Routes.LandingPage, - )} + )} {this.renderRoute(Routes.GettingStartedPage, - , true)} {this.renderRoute('/configure', - )} {this.renderRoute('/run-monkey', - )} {this.renderRoute('/infection/map', - )} {this.renderRoute('/infection/telemetry', - )} {this.renderRoute('/start-over', - )} {this.redirectTo('/report', '/report/security')} {this.renderRoute('/report/security', - )} {this.renderRoute('/report/attack', - )} {this.renderRoute('/report/zeroTrust', - )} {this.renderRoute('/report/ransomware', - )} {this.renderRoute('/license', - )} diff --git a/monkey/monkey_island/cc/ui/src/components/layouts/DisabledSidebarLayoutComponent.tsx b/monkey/monkey_island/cc/ui/src/components/layouts/DisabledSidebarLayoutComponent.tsx deleted file mode 100644 index cbda44206..000000000 --- a/monkey/monkey_island/cc/ui/src/components/layouts/DisabledSidebarLayoutComponent.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import {Route} from 'react-router-dom'; -import SideNavComponent from '../SideNavComponent.tsx'; -import {Col, Row} from 'react-bootstrap'; - -export const DisabledSidebarLayoutComponent = ({component: Component, ...rest}) => ( - ( - - - - - - - )}/> -) diff --git a/monkey/monkey_island/cc/ui/src/components/layouts/SidebarLayoutComponent.tsx b/monkey/monkey_island/cc/ui/src/components/layouts/SidebarLayoutComponent.tsx new file mode 100644 index 000000000..45e82e60c --- /dev/null +++ b/monkey/monkey_island/cc/ui/src/components/layouts/SidebarLayoutComponent.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import {Route} from 'react-router-dom'; +import SideNavComponent from '../SideNavComponent.tsx'; +import {Col, Row} from 'react-bootstrap'; + +const SidebarLayoutComponent = ({component: Component, + sideNavDisabled = false, + completedSteps = null, + ...other + }) => ( + { + return ( + + + + + + ) + }}/> +) + +export default SidebarLayoutComponent; diff --git a/monkey/monkey_island/cc/ui/src/components/layouts/StandardLayoutComponent.js b/monkey/monkey_island/cc/ui/src/components/layouts/StandardLayoutComponent.js deleted file mode 100644 index 5d66166d5..000000000 --- a/monkey/monkey_island/cc/ui/src/components/layouts/StandardLayoutComponent.js +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react' -import {Route} from 'react-router-dom' -import SideNavComponent from '../SideNavComponent.tsx' -import {Col, Row} from 'react-bootstrap'; - -export const StandardLayoutComponent = ({component: Component, ...rest}) => ( - ( - - - - - - - )}/> -)