Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit Compliance #1495

Merged
merged 66 commits into from
Jul 31, 2019
Merged

Conversation

sarahd93
Copy link
Contributor

@sarahd93 sarahd93 commented Jul 19, 2019

Checklist:

@codecov
Copy link

codecov bot commented Jul 22, 2019

Codecov Report

Merging #1495 into master will decrease coverage by 0.88%.
The diff coverage is 19.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1495      +/-   ##
==========================================
- Coverage   37.21%   36.33%   -0.89%     
==========================================
  Files        1002     1030      +28     
  Lines       22433    23734    +1301     
  Branches     6180     6554     +374     
==========================================
+ Hits         8348     8623     +275     
- Misses      12766    13732     +966     
- Partials     1319     1379      +60
Impacted Files Coverage Δ
gsa/src/web/pages/scanconfigs/component.js 0.59% <ø> (ø) ⬆️
gsa/src/web/pages/tasks/dialog.js 5.71% <ø> (-2.62%) ⬇️
gsa/src/gmp/capabilities/capabilities.js 100% <ø> (ø) ⬆️
gsa/src/gmp/gmp.js 77.61% <ø> (ø) ⬆️
gsa/src/web/routes.js 83.33% <ø> (ø) ⬆️
gsa/src/web/utils/theme.js 100% <ø> (ø) ⬆️
gsa/src/web/store/entities/reducers.js 100% <ø> (ø) ⬆️
gsa/src/gmp/commands/tasks.js 34.61% <0%> (-2.38%) ⬇️
gsa/src/web/pages/tasks/detailspage.js 13.88% <0%> (-2.53%) ⬇️
gsa/src/web/components/bar/menubar.js 7.29% <0%> (-0.32%) ⬇️
... and 69 more

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 bc10b35...4787a67. Read the comment docs.

@sarahd93 sarahd93 force-pushed the explicit_compliance_gsa8 branch 4 times, most recently from 7f7ccf6 to 620e657 Compare July 26, 2019 12:54
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

I haven't reviewed all code yet. Could you double check only adding audit and policy code in models and commands only if they are used not just copying task and scan config one to one. Removed code is good code 😁

gsa/src/gmp/commands/permissions.js Outdated Show resolved Hide resolved
gsa/src/gmp/commands/permissions.js Outdated Show resolved Hide resolved
gsa/src/gmp/commands/policies.js Outdated Show resolved Hide resolved
gsa/src/gmp/models/audit.js Outdated Show resolved Hide resolved
gsa/src/gmp/models/audit.js Outdated Show resolved Hide resolved
gsa/src/gmp/models/policy.js Outdated Show resolved Hide resolved
@sarahd93 sarahd93 force-pushed the explicit_compliance_gsa8 branch 2 times, most recently from aee582a to dc99c54 Compare July 30, 2019 14:53
@sarahd93 sarahd93 marked this pull request as ready for review July 31, 2019 10:05
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

The PR looks good besides copy and paste mistakes.

Two major things must be done to get this PR into shape:

  • Always use camel case in GSA. For new and changed code we should only use camelCase for variable names. The command classes need to convert the camelCase to underscore names for gsad.
  • Avoid duplicate code. Just copy code where it needs to be copied. Otherwise try to refactor old code to be more flexible e.g. by allowing to change titles.

gsa/src/web/components/bar/menubar.js Outdated Show resolved Hide resolved
gsa/src/web/components/bar/menubar.js Outdated Show resolved Hide resolved
gsa/src/web/components/bar/menubar.js Outdated Show resolved Hide resolved
@@ -57,7 +57,10 @@ const withEntitiesContainer = (
const mapStateToProps = (state, {gmp}) => {
const eSelector = entitiesSelector(state);
const pSelector = getPage(state);
const filter = pSelector.getFilter(gmpname);
let filter = pSelector.getFilter(gmpname);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have been nice to create a distinct PR for such a feature next time.

comment,
hostsOrdering,
id,
in_assets,
Copy link
Contributor

Choose a reason for hiding this comment

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

All new variables should be camelCase

Suggested change
in_assets,
inAssets,

gsa/src/web/pages/policies/importdialog.js Outdated Show resolved Hide resolved
}

EditDialogComponent.propTypes = {
family_name: PropTypes.string,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
family_name: PropTypes.string,
familyName: PropTypes.string,

const data = {
policy,
policyName,
family_name,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
family_name,
familyName,

const {
policy,
policyName,
family_name,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
family_name,
familyName,

return [...nvts].sort(compare);
};

class EditDialogComponent extends React.Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

is the code in this file different from scan configs?

bjoernricks
bjoernricks previously approved these changes Jul 31, 2019
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

Thanks a lot

@swaterkamp swaterkamp merged commit f67e2fe into greenbone:master Jul 31, 2019
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.

3 participants