Skip to content

Commit

Permalink
feat(web-app-reporter): Always show first three tabs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hanna-modica committed Jun 27, 2023
1 parent a4330fe commit 6238864
Showing 1 changed file with 66 additions and 75 deletions.
141 changes: 66 additions & 75 deletions plugins/reporters/web-app-template/src/components/SummaryView.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,87 +373,78 @@ class SummaryView extends React.Component {
<Col span={22} offset={1}>
<Tabs tabPosition="top" className="ort-tabs-summary-overview">
{
webAppOrtResult.hasRuleViolations()
&& (
<TabPane
tab={(
<span>
<ExceptionOutlined />
Rule Violations (
{
ruleViolations.length !== unresolvedRuleViolations
&& `${unresolvedRuleViolations}/`
}
{ruleViolations.length}
)
</span>
)}
key="ort-summary-rule-violations-table"
>
<RuleViolationsTable
onChange={
SummaryView.onChangeRuleViolationsTable
<TabPane
tab={(
<span>
<ExceptionOutlined />
Rule Violations (
{
ruleViolations.length !== unresolvedRuleViolations
&& `${unresolvedRuleViolations}/`
}
ruleViolations={webAppOrtResult.ruleViolations}
showExcludesColumn={webAppOrtResult.hasExcludes()}
state={columns.ruleViolations}
/>
</TabPane>
)
{ruleViolations.length}
)
</span>
)}
key="ort-summary-rule-violations-table"
>
<RuleViolationsTable
onChange={
SummaryView.onChangeRuleViolationsTable
}
ruleViolations={webAppOrtResult.ruleViolations}
showExcludesColumn={webAppOrtResult.hasExcludes()}
state={columns.ruleViolations}
/>
</TabPane>
}
{
webAppOrtResult.hasIssues()
&& (
<TabPane
tab={(
<span>
<BugOutlined />
Issues (
{
issues.length !== unresolvedIssues
&& `${unresolvedIssues}/`
}
{issues.length}
)
</span>
)}
key="ort-summary-issues-table"
>
<IssuesTable
issues={webAppOrtResult.issues}
onChange={
SummaryView.onChangeIssuesTable
<TabPane
tab={(
<span>
<BugOutlined />
Issues (
{
issues.length !== unresolvedIssues
&& `${unresolvedIssues}/`
}
showExcludesColumn={webAppOrtResult.hasExcludes()}
state={columns.issues}
/>
</TabPane>
)
{issues.length}
)
</span>
)}
key="ort-summary-issues-table"
>
<IssuesTable
issues={webAppOrtResult.issues}
onChange={
SummaryView.onChangeIssuesTable
}
showExcludesColumn={webAppOrtResult.hasExcludes()}
state={columns.issues}
/>
</TabPane>
}
{
webAppOrtResult.hasVulnerabilities()
&& (
<TabPane
tab={(
<span>
<SecurityScanOutlined />
Vulnerabilities (
{vulnerabilities.length}
)
</span>
)}
key="ort-summary-vulnerabilities-table"
>
<VulnerabilitiesTable
onChange={
SummaryView.onChangeVulnerabilitiesTable
}
vulnerabilities={webAppOrtResult.vulnerabilities}
showExcludesColumn={webAppOrtResult.hasExcludes()}
state={columns.vulnerabilities}
/>
</TabPane>
)
<TabPane
tab={(
<span>
<SecurityScanOutlined />
Vulnerabilities (
{vulnerabilities.length}
)
</span>
)}
key="ort-summary-vulnerabilities-table"
>
<VulnerabilitiesTable
onChange={
SummaryView.onChangeVulnerabilitiesTable
}
vulnerabilities={webAppOrtResult.vulnerabilities}
showExcludesColumn={webAppOrtResult.hasExcludes()}
state={columns.vulnerabilities}
/>
</TabPane>
}
{
webAppOrtResult.hasDeclaredLicensesProcessed()
Expand Down

0 comments on commit 6238864

Please sign in to comment.