Skip to content

Conversation

VakarisZ
Copy link
Contributor

What does this PR do?

Fixes parts of #1241

Add any further explanations here.

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by manual tests

Screenshots:

landing_page

image

@codecov
Copy link

codecov bot commented Jul 15, 2021

Codecov Report

Merging #1326 (6796845) into develop (f804d6c) will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1326      +/-   ##
===========================================
- Coverage    40.31%   40.28%   -0.04%     
===========================================
  Files          471      475       +4     
  Lines        13826    14041     +215     
===========================================
+ Hits          5574     5656      +82     
- Misses        8252     8385     +133     
Impacted Files Coverage Δ
monkey/infection_monkey/monkey.py 0.00% <0.00%> (ø)
...nkey/infection_monkey/ransomware/file_selectors.py 100.00% <0.00%> (ø)
...unit_tests/infection_monkey/ransomware/conftest.py 100.00% <0.00%> (ø)
...ction_monkey/ransomware/ransomware_target_files.py 100.00% <0.00%> (ø)
...nkey/infection_monkey/ransomware/readme_dropper.py 86.66% <0.00%> (ø)
...on_monkey/ransomware/ransomware_payload_builder.py 0.00% <0.00%> (ø)
...ction_monkey/ransomware/in_place_file_encryptor.py 100.00% <0.00%> (ø)
...y/infection_monkey/ransomware/ransomware_config.py 100.00% <0.00%> (ø)
.../infection_monkey/ransomware/ransomware_payload.py 97.87% <0.00%> (+1.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f804d6c...6796845. Read the comment docs.

@VakarisZ VakarisZ force-pushed the ransomware_landing_page branch from dc1dd11 to dae6692 Compare July 15, 2021 07:22
…avigation button to go out of "active" mode on ransomware report tab
Comment on lines +37 to +38
LandingPage: '/landing-page',
GettingStartedPage: '/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the landing page be / and the getting started page be /getting-started?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The /landing-page is only default as long as the mode is not chosen

Comment on lines +66 to +71
<h4 className={'monkey-description-title'}>What is Infection Monkey?</h4>
<strong>Infection Monkey</strong> is an open-source security tool for testing a data center's resiliency to
perimeter
breaches and internal server infections. The Monkey uses various methods to propagate across a data center
and reports to this Monkey Island Command and Control server.
</>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this duplicate to the Getting Started page ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this was a requirement we set in the issue

Comment on lines 6 to 15
export const DisabledSidebarLayoutComponent = ({component: Component, ...rest}) => (
<Route {...rest} render={() => (
<Row>
<Col sm={3} md={3} lg={3} xl={2} className='sidebar'>
<SideNavComponent disabled={true} completedSteps={rest['completedSteps']}/>
</Col>
<Component {...rest} />
</Row>
)}/>
)
Copy link
Collaborator

@mssalvatore mssalvatore Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be mostly duplicated from StandardLayoutComponent. Why not just pass a sidebarDisabled prop to StandardLayoutComponent?

Copy link
Contributor

@shreyamalviya shreyamalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions (not all related to the PR)

}
});
};

checkMode = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be named better. setModeFromBackend()?

Comment on lines 148 to 157
needsRedirectionToLandingPage = (route_path) => {
return (this.state.islandMode === null && route_path !== Routes.LandingPage)
}

needsRedirectionToGettingStarted = (route_path) => {
return route_path === Routes.LandingPage &&
this.state.islandMode !== null &&
this.state.islandMode !== undefined
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're checking that this.state.islandMode is not null or undefined in needsRedirectionToGettingStarted but only checking that it is null in needsRedirectionToLandingPage. Why aren't you checking if this.state.islandMode is null OR undefined needsRedirectionToLandingPage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, the check for undefined is unnecessary since we set the default to null

@VakarisZ VakarisZ force-pushed the ransomware_landing_page branch from 9c0a423 to 4293673 Compare July 16, 2021 07:40
@VakarisZ VakarisZ merged commit 5a2bb51 into develop Jul 16, 2021
@VakarisZ VakarisZ deleted the ransomware_landing_page branch July 16, 2021 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants