Skip to content

Commit

Permalink
feat(web-app-template): Make use of WebAppIssue.isExcluded
Browse files Browse the repository at this point in the history
This recently added property is `true` if and only if the related
corresponding package is excluded or if the corresponding non-null
affected path is excluded.

So, the exclusion filter in the issues tab as of this change handles
excluded affected paths of issues.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed Apr 26, 2024
1 parent d39e760 commit dd641f8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,20 @@ class IssuesTable extends React.Component {
filteredValue: filteredInfo.excludes || null,
key: 'excludes',
onFilter: (value, webAppOrtIssue) => {
const webAppPackage = webAppOrtIssue.package;

if (value === 'excluded') {
return webAppPackage.isExcluded;
return webAppOrtIssue.isExcluded;
}

if (value === 'included') {
return !webAppPackage.isExcluded;
return !webAppOrtIssue.isExcluded;
}

return false;
},
render: (webAppOrtIssue) => {
const webAppPackage = webAppOrtIssue.package;

return webAppPackage.isExcluded
return webAppOrtIssue.isExcluded
? (
<span className="ort-excludes">
<Tooltip
Expand Down

0 comments on commit dd641f8

Please sign in to comment.