From 04e5334498a9be6b2a5431f70e9aa5d65e82ef3a Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Wed, 24 Apr 2024 11:41:20 +0200 Subject: [PATCH] feat(web-app-template): Make use of `WebAppIssue.isExcluded` 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 --- .../web-app-template/src/components/IssuesTable.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/reporters/web-app-template/src/components/IssuesTable.jsx b/plugins/reporters/web-app-template/src/components/IssuesTable.jsx index 781fc60869c8f..1fe7f96ba00c4 100644 --- a/plugins/reporters/web-app-template/src/components/IssuesTable.jsx +++ b/plugins/reporters/web-app-template/src/components/IssuesTable.jsx @@ -157,14 +157,12 @@ 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; @@ -172,7 +170,7 @@ class IssuesTable extends React.Component { render: (webAppOrtIssue) => { const webAppPackage = webAppOrtIssue.package; - return webAppPackage.isExcluded + return webAppOrtIssue.isExcluded ? (