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

✨ Reports - Current Landscape update risk handling #1395

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

sjd78
Copy link
Member

@sjd78 sjd78 commented Sep 22, 2023

Summary

Custom assessments changes risk and confidence to be accessed from Assessment and not Application. The reports page in general, and the Landscape component in specific need to be updated to use risk values from Assessment.

Changes

Reports

  • Fetch Questionnaires and Assessments to allow easy use in the Questionnaire select menu
  • Adjust the Cards to be clickable and selectable when we provide custom actions (to avoid a console warning)

Landscape

  • Use data from props instead of fetching any additional data. The containing component is now responsible for controlling the source data.
  • Aggregate risk data into buckets matching Risk options - Setup responsive layout so the donut charts wrap nicely when the view becomes narrow

Donut

  • Force id to be provided
  • Set the width to 200px
  • Make sure content lines up centered in its container

Deprecated useFetchRisks()

Screenshots

All questionnaires:
image

Single questionnaire:
image

References

Enhancement: https://github.com/konveyor/enhancements/blob/90b827b68cc367284a66bf66f087d5c263487e05/enhancements/assessment-module/README.md#changes-in-the-application-reports-view
Part Of: #1305
Follow Up: #1374

Custom assessments changes risk and confidence to be accessed from
`Assessment` and not `Application`.  The reports page in general, and
the `Landscape` component in specific need to be updated to use risk
values from `Assessment`.

Summary of Change:
  - `Reports`
    - Fetch `Questionnaires` and `Assessments` to allow easy use
      in the Questionnaire select menu
    - Adjust the `Card`s to be clickable and selectable when we provide
      custom actions (to avoid a console warning)

  - `Landscape`
    - Use data from props instead of fetching any additional data. The
      containing component is now responsible for controlling the
      source data.
    - Aggregate risk data into buckets matching `Risk` options
    - Setup responsive layout so the donut charts wrap nicely when the
      view becomes narrow

  - `Donut`
    - Force `id` to be provided
    - Set the width to `200px`
    - Make sure content lines up centered in its container

  - Deprecated `useFetchRisks()`

Enhancement: https://github.com/konveyor/enhancements/blob/90b827b68cc367284a66bf66f087d5c263487e05/enhancements/assessment-module/README.md#changes-in-the-application-reports-view
Part Of: konveyor#1305
Follow Up: konveyor#1374

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
@sjd78 sjd78 mentioned this pull request Sep 22, 2023
4 tasks
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (de9b20d) 41.34% compared to head (93a0427) 41.34%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1395   +/-   ##
=======================================
  Coverage   41.34%   41.34%           
=======================================
  Files         138      138           
  Lines        4334     4334           
  Branches     1039     1039           
=======================================
  Hits         1792     1792           
  Misses       2454     2454           
  Partials       88       88           
Flag Coverage Δ
client 41.34% <ø> (ø)
server ∅ <ø> (∅)

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.

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.

2 participants