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

Update opensight from main #4159

Merged
merged 151 commits into from
Sep 25, 2024
Merged

Update opensight from main #4159

merged 151 commits into from
Sep 25, 2024

Conversation

daniele-mng
Copy link
Contributor

What

Why

References

Checklist

  • Tests

bjoernricks and others added 30 commits June 6, 2024 11:43
An instance variable stores the value directly and doesn't cause
re-renders if it is changed. Variables returned from this hooks are
comparable to instance variables for class components.
The dependency review workflow is able to write a summary message to the
PR if it is allowed to write to the workflow.
The useShallowEqualSelector hooks allows to avoid re-renders if an
object is selected from the redux store but its value(s) didn't change.
With the standard selector which uses `===` comparison even updating an
object's value to the same value will cause a re-render (because a new
state object is created).

This pattern can be found at https://react-redux.js.org/api/hooks#recipe-useshallowequalselector
The new usePageFilter hook allows to get the current applied filter of a
page from the redux store.
Update the usePageFilter hook to add additional functions to change,
reset and remove a page filter.
The selectors where invented for usage with mapStateToProps therefore
they return objects at the moment. To avoid unnecessary re-renders the
returned objects need to be compared with shallow equal.
At the end FilterProvider should be replaced with usePageFilter
completely.
Allow for better reading flow where variables and hooks are defined at
the top.
* Add: CVSS 4.0 Calculator
* Add: test for CvssV4Point0Calculator
* Apply: review comments
* Add: German translations
Add a new hooks that allows to get the previous value after the value is
changed. For example this hook can be used to check whether a filter has
changed.
CVSS 4.0 metrics can now be displayed in CVE details.
for translation and consistency with the calculator.
The hook can be used to run a function after a specific amount of time
for example for doing a reload of data.
* Change: withIconSize HOC to hook

* add tests

* improve test coverage

* remove snapshot test
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
The new useReload hook is based in useTiming. It calls a timing
function before every reload to calculate the timeout before the reload.
This timing function gets a isVisible argument passed. Using the
argument the timing function can decide to extend the timeout when the
current browser window is not visible.
The hook determines the sort field and direction of a filter and allows
to change both via a returned function. The hook can be used to
implement the filter changes when clicking on the different header
columns of a entities list.
The hook returns functions the update a filter for getting the next,
previous, first and last page for a list of entities.
The useSelection hook implements the entity selection at a entities list
table. It is possible to select/deselect specific entities from the
list/table, to select all entities displayed at the page or all entities
for the current filter (filter without rows value applied).
Copy link

github-actions bot commented Sep 10, 2024

Conventional Commits Report

Type Number
Changed 14
Bug Fixes 12
Dependencies 27
Added 24
Removed 1

🚀 Conventional commits found.

a-h-abdelsalam and others added 14 commits September 10, 2024 14:29
…-setting

fix: default filter selection in details page
Removes [path-to-regexp](https://github.com/pillarjs/path-to-regexp). It's no longer used after updating ancestor dependency [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom). These dependencies need to be updated together.


Removes `path-to-regexp`

Updates `react-router-dom` from 5.3.4 to 6.26.2
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: react-router-dom
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
…-be58494012

Bump path-to-regexp and react-router-dom
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.3 to 5.4.6.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.4.6/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@daniele-mng daniele-mng marked this pull request as ready for review September 24, 2024 12:38
@daniele-mng daniele-mng requested a review from a team as a code owner September 24, 2024 12:38
a-h-abdelsalam
a-h-abdelsalam previously approved these changes Sep 24, 2024
@daniele-mng daniele-mng merged commit 40e19d4 into opensight-ui Sep 25, 2024
10 checks passed
@daniele-mng daniele-mng deleted the update-from-main branch September 25, 2024 05:31
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

Attention: Patch coverage is 67.06915% with 1500 lines in your changes missing coverage. Please review.

Project coverage is 63.34%. Comparing base (6f39103) to head (3e4c81e).
Report is 165 commits behind head on opensight-ui.

Files with missing lines Patch % Lines
src/web/pages/reports/auditdetailspage.jsx 0.00% 538 Missing and 1 partial ⚠️
src/web/pages/reports/auditdeltadetailspage.jsx 0.00% 420 Missing and 1 partial ⚠️
src/web/routes.jsx 0.00% 154 Missing ⚠️
src/web/authorized.jsx 0.00% 47 Missing ⚠️
src/gmp/commands/auditreports.js 66.90% 46 Missing ⚠️
src/web/pages/reports/auditreportslistpage.jsx 80.80% 24 Missing ⚠️
src/web/pages/reports/details/resultstab.jsx 58.18% 23 Missing ⚠️
.../web/pages/reports/details/auditthresholdpanel.jsx 81.41% 21 Missing ⚠️
src/web/pages/reports/auditdetailscontent.jsx 94.76% 18 Missing and 2 partials ⚠️
src/web/pages/omp.jsx 0.00% 19 Missing ⚠️
... and 38 more
Additional details and impacted files
@@               Coverage Diff                @@
##           opensight-ui    #4159      +/-   ##
================================================
- Coverage         72.32%   63.34%   -8.99%     
================================================
  Files              1068     1107      +39     
  Lines            122474   103441   -19033     
  Branches           6086     6421     +335     
================================================
- Hits              88584    65522   -23062     
- Misses            33859    37753    +3894     
- Partials             31      166     +135     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

7 participants