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

✨ Identified risks enhancements #1573

Merged
merged 17 commits into from
Nov 30, 2023

Conversation

ibolton336
Copy link
Member

@ibolton336 ibolton336 commented Nov 27, 2023

Resolves:
https://issues.redhat.com/browse/MTA-1723
https://issues.redhat.com/browse/MTA-1749
https://issues.redhat.com/browse/MTA-1754
https://issues.redhat.com/browse/MTA-1762

Resolves: #1568
Resolves: #1570
Resolves: #1569

  • New query to collate all apps that are inheriting a specific assessment based on underlying archetype inheritance. Use this new data to fix the applications column in the identified risks table to accurately reflect which applications have a specific risk level for a given answer.
  • Adds the ability to filter the applications table by the applications shown within the identified risks column.
  • Adds expandable functionality for rationale and mitigation text
  • Adds risk column for answer risk level
  • Link to risk filtered app inventory from landscape in reports page
Update-reports.mov
Screenshot 2023-11-27 at 4 29 47 PM Screenshot 2023-11-27 at 4 43 21 PM Screenshot 2023-11-28 at 5 07 32 PM Screenshot 2023-11-28 at 5 08 23 PM

image

@ibolton336 ibolton336 changed the title Identified risks enhancements ✨ Identified risks enhancements Nov 27, 2023
@ibolton336 ibolton336 marked this pull request as ready for review November 27, 2023 20:05
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 23 lines in your changes are missing coverage. Please review.

Comparison is base (835bf11) 39.55% compared to head (d057567) 39.39%.
Report is 1 commits behind head on main.

Files Patch % Lines
client/src/app/queries/assessments.ts 10.52% 17 Missing ⚠️
...p/hooks/table-controls/filtering/useFilterState.ts 0.00% 3 Missing ⚠️
client/src/app/utils/model-utils.tsx 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1573      +/-   ##
==========================================
- Coverage   39.55%   39.39%   -0.16%     
==========================================
  Files         146      146              
  Lines        4786     4810      +24     
  Branches     1143     1152       +9     
==========================================
+ Hits         1893     1895       +2     
- Misses       2879     2901      +22     
  Partials       14       14              
Flag Coverage Δ
client 39.39% <11.53%> (-0.16%) ⬇️
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.

@ibolton336 ibolton336 force-pushed the identified-risks-enhancements branch 2 times, most recently from 4f44b49 to 561117e Compare November 27, 2023 23:28
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.

Looks ok, just a few questions/suggestions

The "fancy" query hook is really the core of this improvement. And as structured, it could be refactored to the backend doing that work at some point in future as well.

@ibolton336 ibolton336 marked this pull request as draft November 28, 2023 21:08
@ibolton336 ibolton336 marked this pull request as ready for review November 29, 2023 16:35
@@ -138,8 +138,6 @@ export const MultiselectFilterControl = <TItem,>({
const input = textInput?.toLowerCase();

return renderSelectOptions((optionProps, groupName) => {
if (!input) return false;
Copy link
Member Author

Choose a reason for hiding this comment

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

Needed to remove this to fix the select options not rendering on first render after converting the app name filter to multiselect for the app inventory table.

…tions

Signed-off-by: ibolton336 <ibolton@redhat.com>
Port over initial filter values change

Properly serialize & deserialize filters to match server side implementation

Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
… same question

Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
Signed-off-by: ibolton336 <ibolton@redhat.com>
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.

Handful of minor non-blocking comments, but looks really good. Everything works in a dev env.

I can see a followup request for filtering on the identified risks table. Trying to look at a single assessment if multiple exist, especially if the assessment you want to look at is not alphabetically first, will be annoying. (Well that is assuming that mere users get annoyed at the same things I do...). To be enhanced in a future PR.

Comment on lines +234 to +236
queryFn: () =>
archetypeId ? getArchetypeById(archetypeId) : undefined,
enabled: !!archetypeId,
Copy link
Member

Choose a reason for hiding this comment

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

With the filtering in place, archetypeId will always be a real number, so this can be simplified:

Suggested change
queryFn: () =>
archetypeId ? getArchetypeById(archetypeId) : undefined,
enabled: !!archetypeId,
queryFn: () => getArchetypeById(archetypeId),

(not blocking)

<TextContent>
<Text component="h3">{t("terms.currentLandscape")}</Text>
<Flex>
Copy link
Member

@sjd78 sjd78 Nov 30, 2023

Choose a reason for hiding this comment

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

The screen shots have the questionnaire dropdown top right in the donut chart card. The code has the drop down next to the "Current landscape" title itself. Not a big difference, but I want to make sure it is currently in the correct place.

Screenshot:
screenshot-localhost_9000-2023 11 30-16_16_37

<Card isExpanded={isRiskCardOpen}>
<CardHeader
onExpand={() => setIsRiskCardOpen((current) => !current)}
>
<CardTitle>
Copy link
Member

@sjd78 sjd78 Nov 30, 2023

Choose a reason for hiding this comment

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

Since the expandy card is simply just always opened now, the extra layout around the header text doesn't make sense.

(not blocking)

Comment on lines +128 to +137
<AssessmentLandscape
questionnaire={null}
assessmentRefs={
application?.assessments || archetype?.assessments
}
/>
<IdentifiedRisksTable
assessmentRefs={
application?.assessments || archetype?.assessments
}
Copy link
Member

Choose a reason for hiding this comment

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

Wrap in a CardBody so the padding matches the report page.

The landscape looks ok, but the risks table is taking up 100% width of the card.

Review page:
screenshot-localhost_9000-2023 11 30-16_05_35

Reports page:
screenshot-localhost_9000-2023 11 30-16_05_52

@sjd78 sjd78 merged commit 85ac7b4 into konveyor:main Nov 30, 2023
10 checks passed
sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request Nov 30, 2023
Followup changes to konveyor#1573:
  - Simplify the assessment risk query
  - Simplify the header for reports / identified risk card header
  - Fixup layout of the review page assessment summary card

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
ibolton336 pushed a commit that referenced this pull request Dec 1, 2023
Followup changes to #1573:
  - Simplify the assessment risk query
  - Simplify the header for reports / identified risk card header
  - Fixup layout of the review page assessment summary card

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
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.

Restore review application details Landscape report card enhancement Identified risk table enhancements
2 participants