From 6238864282a8cc862b1be861326e8613cd88ce54 Mon Sep 17 00:00:00 2001 From: Hanna Modica Date: Wed, 21 Jun 2023 16:33:31 +0200 Subject: [PATCH] feat(web-app-reporter): Always show first three tabs Always show the rule violations, issues and vulnerabilities tabs. This allows on the one hand the view to be more consistent, by always showing the same tabs, and on the other hand allows to check resolutions, even if there are no open violations, issues or vulnerabilities left. resolves #6232 --- .../src/components/SummaryView.js | 141 ++++++++---------- 1 file changed, 66 insertions(+), 75 deletions(-) diff --git a/plugins/reporters/web-app-template/src/components/SummaryView.js b/plugins/reporters/web-app-template/src/components/SummaryView.js index de6174c39cf49..a3fd62371bb43 100644 --- a/plugins/reporters/web-app-template/src/components/SummaryView.js +++ b/plugins/reporters/web-app-template/src/components/SummaryView.js @@ -373,87 +373,78 @@ class SummaryView extends React.Component { { - webAppOrtResult.hasRuleViolations() - && ( - - - Rule Violations ( - { - ruleViolations.length !== unresolvedRuleViolations - && `${unresolvedRuleViolations}/` - } - {ruleViolations.length} - ) - - )} - key="ort-summary-rule-violations-table" - > - + + Rule Violations ( + { + ruleViolations.length !== unresolvedRuleViolations + && `${unresolvedRuleViolations}/` } - ruleViolations={webAppOrtResult.ruleViolations} - showExcludesColumn={webAppOrtResult.hasExcludes()} - state={columns.ruleViolations} - /> - - ) + {ruleViolations.length} + ) + + )} + key="ort-summary-rule-violations-table" + > + + } { - webAppOrtResult.hasIssues() - && ( - - - Issues ( - { - issues.length !== unresolvedIssues - && `${unresolvedIssues}/` - } - {issues.length} - ) - - )} - key="ort-summary-issues-table" - > - + + Issues ( + { + issues.length !== unresolvedIssues + && `${unresolvedIssues}/` } - showExcludesColumn={webAppOrtResult.hasExcludes()} - state={columns.issues} - /> - - ) + {issues.length} + ) + + )} + key="ort-summary-issues-table" + > + + } { - webAppOrtResult.hasVulnerabilities() - && ( - - - Vulnerabilities ( - {vulnerabilities.length} - ) - - )} - key="ort-summary-vulnerabilities-table" - > - - - ) + + + Vulnerabilities ( + {vulnerabilities.length} + ) + + )} + key="ort-summary-vulnerabilities-table" + > + + } { webAppOrtResult.hasDeclaredLicensesProcessed()