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

[frontend/backend] add inject result inside report #1519

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MarineLeM
Copy link
Contributor

issue : #1080
Chunk 2

add result inject inside report
image

Signed-off-by: Marine LM <marine.lemezo@filigran.io>
@github-actions github-actions bot added the filigran team use to identify PR from the Filigran team label Sep 23, 2024
Signed-off-by: Marine LM <marine.lemezo@filigran.io>
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 32.61%. Comparing base (c1a9e19) to head (fadc3c8).

Files with missing lines Patch % Lines
...rc/main/java/io/openbas/rest/inject/InjectApi.java 0.00% 7 Missing ⚠️
...rc/main/java/io/openbas/rest/report/ReportApi.java 60.00% 0 Missing and 2 partials ⚠️
...rc/main/java/io/openbas/service/InjectService.java 0.00% 2 Missing ⚠️
...bas/rest/report/form/ReportInjectCommentInput.java 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1519      +/-   ##
============================================
+ Coverage     32.55%   32.61%   +0.05%     
- Complexity     1464     1470       +6     
============================================
  Files           534      535       +1     
  Lines         13766    13796      +30     
  Branches        824      827       +3     
============================================
+ Hits           4482     4500      +18     
- Misses         9075     9084       +9     
- Partials        209      212       +3     
Flag Coverage Δ
32.61% <60.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Comment on lines +57 to +60
ReportInjectComment reportInjectComment = report.getReportInjectsComments().stream()
.filter(c -> c.getInject().getId().equals(input.getInjectId()))
.findFirst()
.orElse(null);
Copy link
Member

Choose a reason for hiding this comment

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

Can we have the direct query to do that ?
To avoid hibernate to lazy load too much datas

@@ -18,7 +18,7 @@ const ERROR_30S_DELAY = 30000;
let sseClient;
let lastPingDate = new Date().getTime();
const listeners = new Map();
const useDataLoader = (loader = () => {}) => {
const useDataLoader = (loader = () => {}, refetchArg = []) => {
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain this changes ?
Thank you

{t('Injects results')}
</Typography>

<TableContainer component={Paper}>
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure this is the UI we want
The background and the border are differents
image

<TableRow>
{columns.map((col) => (
<TableCell
sx={col.label === 'Comment' ? { padding: '0px', width: '35%', flexGrow: 1 } : {}}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
sx={col.label === 'Comment' ? { padding: '0px', width: '35%', flexGrow: 1 } : {}}
sx={col.label === 'Comments' ? { padding: '0px', width: '35%', flexGrow: 1 } : {}}

const currentInjectComment = findInjectCommentsByInjectId(inject.inject_id);

return (editInjectId === inject.inject_id
? <TextField
Copy link
Member

Choose a reason for hiding this comment

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

This is a new behavior in the OpenBAS platform.
Are we sure this is what we want ?

}

@JsonProperty("report_id")
public String getReportId() {
Copy link
Member

Choose a reason for hiding this comment

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

reportId is String here and UUID in ReportInjectCommentId ?
I don't understand

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