demisto / sane-reports

Reports library that will keep you sane and not pulling your hair out
Apache License 2.0
53 stars 13 forks source link

CRTX-98811, CRTX-101690, CRTX-96742: Reports are not correctly formatted to PDF #264

Closed lmichalevich closed 10 months ago

lmichalevich commented 11 months ago

Description

This PR is fixing issue with tables are not displaying their whole rows.

Screenshot 2023-12-31 at 17 17 55

And an issue that we had overlapping sections.

Screenshot 2024-01-02 at 11 41 12

Implementation details

Screenshot 2024-01-04 at 14 58 08

It was added so sections in a grid will take the whole height so the borders will look well.

Screenshot 2024-01-04 at 15 02 38


Screenshot 2024-01-04 at 14 58 24

It was added to evidence row (or similar items) will look like this:

Screenshot 2024-01-04 at 15 01 26

When there is one item inside the flex is not needed.


QA

Generated Report

investigationSummaryReport_1703159885621320074.json

Before

investigationSummaryReport_1703159885621320074.pdf

After

investigationSummaryReport_1703159885621320074_after.pdf

Comparing notes

When generating a report with a markdown table with a lot of rows had an issue that some of the rows were hidden. It also reproduces before this change: https://github.com/demisto/sane-reports/pull/259.

Screenshot 2024-01-01 at 17 15 02

Because of this change now more data is visible. Also there is now a small margin between the evidences.

Screenshot 2024-01-01 at 17 35 12


Generated Report

176b15de-9301-4f76-8e81-fad81bfb7bfc_1703157199715137908.json

Before

176b15de-9301-4f76-8e81-fad81bfb7bfc_1703157199715137908.pdf

After

176b15de-9301-4f76-8e81-fad81bfb7bfc_1703157199715137908_after.pdf

Comparing notes

Looks the same.

Also tested on A3 and it still looks well (not like described in the issue): 176b15de-9301-4f76-8e81-fad81bfb7bfc_1703157199715137908_after_A3.pdf


Generated Report

investigationSummaryReport_1704119961501017000.json

Before

investigationSummaryReport_1704119961501017000_before.pdf

After

investigationSummaryReport_1704119961501017000_after.pdf

Comparing notes

Looks the same.

I noticed a potential bug that markdown fields are not displayed as a markdown. Validated that it also looked like this before the changes in https://github.com/demisto/sane-reports/pull/249.


Generated Report

testLayoutIncidenInfo.json

Before

testLayoutIncidenInfo_before.pdf

After

testLayoutIncidenInfo_after.pdf

Comparing notes

Looks the same.


Generated Report

CRTX-96742.json

Before

CRTX-96742_before.pdf

After

CRTX-96742_after.pdf

Comparing notes

An overlapping issue was fixed


Generated Report

genTempCPUBug.json

Before

genTempCPUBug_before.pdf

After

genTempCPUBug_after.pdf

Comparing notes

Looks the same.


Generated Report

investigationSummaryReport_1704192927372821424.json

Before

investigationSummaryReport_1704192927372821424_before.pdf

After

investigationSummaryReport_1704192927372821424_after.pdf

Comparing notes

An overlapping issue was fixed