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 issue.

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Apr 24, 2024
1 parent 8702998 commit 86c80d9
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 86c80d9

Please sign in to comment.