From 5121a4fe54e5a41b8f50a7bd240a341b2fe06d3a Mon Sep 17 00:00:00 2001 From: Itay Mizeretz Date: Tue, 17 Oct 2017 14:47:33 +0300 Subject: [PATCH] Split readme to landing page + license Make font even across pages --- monkey_island/cc/ui/package.json | 3 -- monkey_island/cc/ui/src/components/Main.js | 11 ++--- .../cc/ui/src/components/pages/LicensePage.js | 44 +++++------------- .../cc/ui/src/components/pages/ReportPage.js | 2 +- .../ui/src/components/pages/RunMonkeyPage.js | 1 + .../ui/src/components/pages/RunServerPage.js | 14 +++--- monkey_island/cc/ui/src/readme/About.md | 30 ------------- monkey_island/cc/ui/src/readme/HowItWorks.md | 41 ----------------- monkey_island/cc/ui/src/readme/License.md | 45 ------------------- monkey_island/cc/ui/src/readme/Usage.md | 10 ----- monkey_island/cc/ui/src/styles/App.css | 5 +++ 11 files changed, 34 insertions(+), 172 deletions(-) delete mode 100644 monkey_island/cc/ui/src/readme/About.md delete mode 100644 monkey_island/cc/ui/src/readme/HowItWorks.md delete mode 100644 monkey_island/cc/ui/src/readme/License.md delete mode 100644 monkey_island/cc/ui/src/readme/Usage.md diff --git a/monkey_island/cc/ui/package.json b/monkey_island/cc/ui/package.json index d744b8c89..64d7643ce 100644 --- a/monkey_island/cc/ui/package.json +++ b/monkey_island/cc/ui/package.json @@ -64,11 +64,8 @@ "bootstrap": "^3.3.7", "core-js": "^2.5.1", "fetch": "^1.1.0", - "github-markdown-css": "^2.8.0", - "marked": "^0.3.6", "normalize.css": "^4.0.0", "prop-types": "^15.5.10", - "raw-loader": "^0.5.1", "react": "^15.6.1", "react-bootstrap": "^0.31.2", "react-copy-to-clipboard": "^5.0.0", diff --git a/monkey_island/cc/ui/src/components/Main.js b/monkey_island/cc/ui/src/components/Main.js index 36f57387e..43e02fbf1 100644 --- a/monkey_island/cc/ui/src/components/Main.js +++ b/monkey_island/cc/ui/src/components/Main.js @@ -10,7 +10,7 @@ import MapPage from 'components/pages/MapPage'; import TelemetryPage from 'components/pages/TelemetryPage'; import StartOverPage from 'components/pages/StartOverPage'; import ReportPage from 'components/pages/ReportPage'; -import ReadMePage from 'components/pages/ReadMePage'; +import LicensePage from 'components/pages/LicensePage'; require('normalize.css/normalize.css'); require('react-data-components/css/table-twbs.css'); @@ -116,17 +116,18 @@ class AppComponent extends React.Component {
-
+
Powered by GuardiCore
- +
+ License +
( )} /> @@ -136,7 +137,7 @@ class AppComponent extends React.Component { ( )} /> ( )} /> ( )} /> - ( )} /> + ( )} /> diff --git a/monkey_island/cc/ui/src/components/pages/LicensePage.js b/monkey_island/cc/ui/src/components/pages/LicensePage.js index ad10cf787..d2303b195 100644 --- a/monkey_island/cc/ui/src/components/pages/LicensePage.js +++ b/monkey_island/cc/ui/src/components/pages/LicensePage.js @@ -1,28 +1,9 @@ import React from 'react'; -import {Col, Nav, NavItem} from 'react-bootstrap'; -var marked = require('marked'); +import {Col} from 'react-bootstrap'; -var aboutDoc = require('raw!../../readme/About.md'); -var usageDoc = require('raw!../../readme/Usage.md'); -var howItWorksDoc = require('raw!../../readme/HowItWorks.md'); -var licenseDoc = require('raw!../../readme/License.md'); - -class ReadMePageComponent extends React.Component { +class LicensePageComponent extends React.Component { constructor(props) { super(props); - - this.sectionKeys = ['about', 'howItWorks', 'usage', 'license']; - this.sections = - { - about: {title: 'About', data: aboutDoc}, - usage: {title: 'Usage', data: usageDoc}, - howItWorks: {title: 'How It Works', data: howItWorksDoc}, - license: {title: 'License', data: licenseDoc} - }; - - this.state = { - selectedSection: this.sectionKeys[0] - } } setSelectedSection = (key) => { @@ -32,22 +13,21 @@ class ReadMePageComponent extends React.Component { }; render() { - return ( -

Read Me

- -
+

License

+
+

+ Copyright 2017 Guardicore Ltd. + Licensed under GPLv3. +

+

+ The source code is available on GitHub +

); } } -export default ReadMePageComponent; +export default LicensePageComponent; diff --git a/monkey_island/cc/ui/src/components/pages/ReportPage.js b/monkey_island/cc/ui/src/components/pages/ReportPage.js index b4d6d55c1..d3df674df 100644 --- a/monkey_island/cc/ui/src/components/pages/ReportPage.js +++ b/monkey_island/cc/ui/src/components/pages/ReportPage.js @@ -10,7 +10,7 @@ class ReportPageComponent extends React.Component { return (

Penetration Test Report

-
+

Under construction

diff --git a/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js b/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js index 0de131bdf..1692004b4 100644 --- a/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js +++ b/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js @@ -139,6 +139,7 @@ class RunMonkeyPageComponent extends React.Component {

Run the Monkey

Go ahead and run the monkey! + (Or make further adjustments by configuring the monkey)