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

Add quick filters on scenarios, simulations and atomic testing #1352

Merged
merged 7 commits into from
Sep 5, 2024

Conversation

RomuDeuxfois
Copy link
Member

@RomuDeuxfois RomuDeuxfois commented Aug 27, 2024

Proposed changes

  • Add quick filters on Create a new Inject, Scenarios, Simulations and Atomic Testings
  • Create a new inject
    • Quick filters -> platform, kill chain phase, Target only players, Injector
    • Filters -> Label
  • Scenario
    • Quick filters -> category, kill chain phase, tags
    • Filters -> name, severity, recurrence, updated at, platforms
  • Simulation
    • Quick filters -> scenario, kill chain phases, tags
    • Filters -> name, start date, status, updated
  • Atomic testing
    • Quick filters -> kill chain phases, tags
    • Filters -> title, updated, type

Related issues

@RomuDeuxfois RomuDeuxfois added the filigran team use to identify PR from the Filigran team label Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 21.87500% with 50 lines in your changes missing coverage. Please review.

Project coverage is 30.11%. Comparing base (3d6774a) to head (e5520e6).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...rc/main/java/io/openbas/service/InjectService.java 0.00% 16 Missing ⚠️
.../io/openbas/rest/scenario/utils/ScenarioUtils.java 28.57% 9 Missing and 1 partial ⚠️
.../main/java/io/openbas/utils/CustomFilterUtils.java 0.00% 5 Missing ⚠️
...pi/src/main/java/io/openbas/utils/InjectUtils.java 44.44% 2 Missing and 3 partials ⚠️
...java/io/openbas/rest/inject/ExerciseInjectApi.java 0.00% 4 Missing ⚠️
...java/io/openbas/rest/inject/ScenarioInjectApi.java 0.00% 4 Missing ⚠️
...main/java/io/openbas/importer/V1_DataImporter.java 0.00% 3 Missing ⚠️
...ain/java/io/openbas/rest/exercise/ExerciseApi.java 50.00% 1 Missing ⚠️
.../java/io/openbas/service/AtomicTestingService.java 0.00% 1 Missing ⚠️
.../main/java/io/openbas/service/ScenarioService.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1352      +/-   ##
============================================
+ Coverage     28.84%   30.11%   +1.26%     
- Complexity     1323     1358      +35     
============================================
  Files           526      523       -3     
  Lines         13734    13716      -18     
  Branches        815      837      +22     
============================================
+ Hits           3962     4130     +168     
+ Misses         9587     9391     -196     
- Partials        185      195      +10     

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

@savacano28 savacano28 self-requested a review August 28, 2024 08:40
@RomuDeuxfois RomuDeuxfois force-pushed the issue/1294 branch 2 times, most recently from 885f93d to b3ea90e Compare August 29, 2024 15:16
@RomuDeuxfois RomuDeuxfois marked this pull request as draft August 30, 2024 12:44
@RomuDeuxfois RomuDeuxfois marked this pull request as ready for review September 2, 2024 18:11
@PostMapping(EXERCISE_URI + "/{exerciseId}/injects/simple")
@PreAuthorize("isExerciseObserver(#exerciseId)")
@Transactional(readOnly = true)
public Iterable<InjectOutput> exerciseInjectsSimple(
Copy link
Member

Choose a reason for hiding this comment

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

Is it normal you keep the same API with pagination and not with pagination ? Can you merge the two or there is a reason that we keep the old one ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Originally the API endpoints of all entities returned the entire DB table and everything was stored at the store level.

Going through pagination improves performance to return a more restricted list.

Unfortunately, there is still a lot of code to migrate to use the new endpoints and not all of it can be done in this task. But it’s something to keep in mind!

openbas-front/src/utils/Localization.js Outdated Show resolved Hide resolved
@RomuDeuxfois
Copy link
Member Author

Comments taken into account.
Ready for a second round !

@RomuDeuxfois RomuDeuxfois merged commit 5d40676 into master Sep 5, 2024
7 checks passed
@RomuDeuxfois RomuDeuxfois deleted the issue/1294 branch September 5, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants