-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature/osidb 3129 multi flaws related trackers #377
base: main
Are you sure you want to change the base?
Conversation
50bdf0e
to
609f34e
Compare
609f34e
to
2e07344
Compare
cacdd1e
to
7284066
Compare
🐛 Remove merge artefacts 🐛 Fix check for affect presence 🐛 Fix unmount cleanup function on loading directive The cause seems to have been 'patch-style' updates to pieces of the DOM that were done via hot-reloading. ♻️ Ensure type signature 🚧 Request trackers for related flaws OSIDB endpoint seems to be returning only trackers for affect of current flaw. ✨ Provide new Tabs component with dynamic slot scopes 🚧 Provide UI for multiflaws Filing trackers doesn't work due to module_components from OSIDB's tracker querying endpoint only having an association with a single affect. ♻️ Unpack object error values from OSIDB error response data 🚧 Synchronize tracker selections 💄 Use tracker theme color for trackers manager 💄 Use tracker theme color for trackers manager 💄 Use tracker theme color on related Flaw tabs 💄 Refine trackers manager layout ✨ Connect filing for multiple flaws 🔥 Remove unused file 🏷️ Improve type safety
💄 Make untrackable affects alert full-screen 🔥 Remove unused functions 💄 Refine trackers manager layout
213bae7
to
5cdc3a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably was reverted during merge. it was change don #387
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Friendly reminder on the points commented on the code review meeting:
- Style issue in some local instances (e.g. trackers table background disappear)
- Add tracker button (file trackers for individual affect) not currently working
isSelectableFn
possible renaming?- Double scroll on tracker manager lists?
function filterAffects(affects: ZodAffectType[]): ZodAffectType[] { | ||
return affects.filter((affect) => { | ||
const matchesSelectedModules = | ||
selectedModules.value.length === 0 || selectedModules.value.includes(affect.ps_module); | ||
const matchesAffectednessFilter = | ||
affectednessFilter.value.length === 0 || affectednessFilter.value.includes(affect.affectedness ?? ''); | ||
const matchesResolutionFilter = | ||
resolutionFilter.value.length === 0 || resolutionFilter.value.includes(affect.resolution ?? ''); | ||
const matchesImpactsFilter = | ||
impactFilter.value.length === 0 || impactFilter.value.includes(affect.impact ?? ''); | ||
return matchesSelectedModules && matchesAffectednessFilter && matchesResolutionFilter && matchesImpactsFilter; | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible suggestion to follow DRY principle
function filterAffects(affects: ZodAffectType[]): ZodAffectType[] { | |
return affects.filter((affect) => { | |
const matchesSelectedModules = | |
selectedModules.value.length === 0 || selectedModules.value.includes(affect.ps_module); | |
const matchesAffectednessFilter = | |
affectednessFilter.value.length === 0 || affectednessFilter.value.includes(affect.affectedness ?? ''); | |
const matchesResolutionFilter = | |
resolutionFilter.value.length === 0 || resolutionFilter.value.includes(affect.resolution ?? ''); | |
const matchesImpactsFilter = | |
impactFilter.value.length === 0 || impactFilter.value.includes(affect.impact ?? ''); | |
return matchesSelectedModules && matchesAffectednessFilter && matchesResolutionFilter && matchesImpactsFilter; | |
}); | |
} | |
const matchAffectFilter = <T extends Ref>(filter: T, field: string) => | |
filter.value.length === 0 || filter.value.includes(field ?? ''); | |
function filterAffects(affects: ZodAffectType[]): ZodAffectType[] { | |
return affects.filter(affect => | |
matchAffectFilter(selectedModules, affect.ps_module) | |
&& matchAffectFilter(affectednessFilter, affect.affectedness) | |
&& matchAffectFilter(resolutionFilter, affect.resolution) | |
&& matchAffectFilter(impactFilter, affect.impact), | |
); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been fixed already, so another rebase? 😓
[OSIDB-ID] [Title]
Checklist:
Summary:
[Replace with a brief summary of the changes introduced by this PR.]
Changes:
[Replace with a detailed description of the changes made in this PR, including any new features, enhancements, bug fixes, or refactorings.]
Considerations:
[Replace with any additional considerations, notes, or instructions for reviewers.]