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

✨ Fetch export questionnaire and application static report with refactor. #1322

Merged
merged 9 commits into from
Sep 13, 2023
Merged

✨ Fetch export questionnaire and application static report with refactor. #1322

merged 9 commits into from
Sep 13, 2023

Conversation

gildub
Copy link
Contributor

@gildub gildub commented Aug 30, 2023

Use file-saver package similarly as the download approach for the application static report.

Refactor the application static report download hook :

  • Move the useFetchStaticReport (former useDownloadStaticReport) within queries/applications.ts because it's tapping into applications ressource.
  • As the download is only fetching (GET) the report data this is not a mutation.

Resolves #1262

@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Patch coverage: 38.09% and project coverage change: +0.02% 🎉

Comparison is base (fd89fb8) 42.38% compared to head (e431887) 42.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1322      +/-   ##
==========================================
+ Coverage   42.38%   42.41%   +0.02%     
==========================================
  Files         137      138       +1     
  Lines        4294     4315      +21     
  Branches     1010     1017       +7     
==========================================
+ Hits         1820     1830      +10     
- Misses       2462     2473      +11     
  Partials       12       12              
Flag Coverage Δ
client 42.41% <38.09%> (+0.02%) ⬆️
server ∅ <ø> (∅)

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

Files Changed Coverage Δ
client/src/app/api/rest.ts 54.09% <20.00%> (-0.81%) ⬇️
client/src/app/queries/questionnaires.ts 22.22% <25.00%> (+0.79%) ⬆️
client/src/app/queries/applications.ts 47.54% <50.00%> (+0.17%) ⬆️
client/src/app/api/models.ts 100.00% <100.00%> (ø)

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

@gildub gildub marked this pull request as ready for review August 30, 2023 12:24
@gildub gildub requested review from ibolton336 and mturley August 30, 2023 12:27
@gildub gildub self-assigned this Aug 30, 2023
Copy link
Collaborator

@mturley mturley left a comment

Choose a reason for hiding this comment

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

+1 to Ian's feedback, LGTM otherwise.

Edit: Mea culpa, I reviewed without testing and didn't catch the below issues. Will review again.

@gildub gildub requested review from mturley and ibolton336 August 30, 2023 16:19
@ibolton336
Copy link
Member

Something isn't looking right in the drawer
Screenshot 2023-08-30 at 1 37 18 PM

@gildub
Copy link
Contributor Author

gildub commented Aug 31, 2023

@ibolton336, we're getting the "Error downloading report" as well on main branch when clicking on the YAML or Report links. So is that approach is solid enough ?

image

I'm investigating...

@gildub gildub requested a review from ibolton336 September 6, 2023 14:17
@gildub gildub requested review from sjd78 and ibolton336 September 7, 2023 16:15
@gildub gildub changed the title ✨ fetch export questionnaire and application static report ✨ Fetch export questionnaire and application static report with refactor. Sep 11, 2023
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

The change is looking nice and clean now. Only a single nit-pick, but not a blocker.

@sjd78 sjd78 dismissed ibolton336’s stale review September 12, 2023 17:22

Looks like all of Ian's comments were addressed.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

I think one more step to get the button text (or react node) to render is still needed.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
Signed-off-by: Gilles Dubreuil <gdubreui@redhat.com>
@gildub gildub merged commit 1117014 into konveyor:main Sep 13, 2023
@gildub gildub deleted the export-questionnaire-initial branch September 13, 2023 07:59
@ibolton336
Copy link
Member

Looks like this broke the tar download functionality and the loading spinner in the app analysis detail drawer.

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.

Export questionnaires
5 participants