3 |
Maven:org.apache.commons:commons-text:1.1 |
@@ -808,10 +836,10 @@ The project is excluded for the following reason(s):
- EXAMPLE_OF - The project is an example.
+ EXAMPLE_OF - The project is an example.
- VCS Information
-
+ VCS Information
+
Type |
@@ -831,8 +859,8 @@ VCS Information
- Packages
-
+ Packages
+
# |
@@ -844,7 +872,7 @@ Packages
-
+
1 |
Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0 |
|
@@ -856,7 +884,7 @@ Packages
Detected Licenses (from VCS):
-
-
MIT (Excluded: EXAMPLE_OF - These are example files.)
+ MIT (Excluded: EXAMPLE_OF - These are example files.)
Effective License:
-
@@ -882,7 +910,7 @@
Packages
-
2024-04-25T07:44:20.725613974Z [ERROR]: FakeScanner - Example error.
- -
+
-
2024-04-25T07:44:20.725613974Z [ERROR]: FakeScanner - Example error, resolved.
Resolved by: CANT_FIX_ISSUE - Resolved for illustration.
@@ -894,7 +922,7 @@ Packages
Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 (analyzer/src/funTest/assets/projects/synthetic/gradle/lib/build.gradle)
VCS Information
-
+
Type |
@@ -915,7 +943,7 @@ VCS Information
Packages
-
+
# |
@@ -927,7 +955,7 @@ Packages
-
+
1 |
Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 |
|
@@ -956,7 +984,7 @@ Packages
2024-04-25T07:44:20.725613974Z [ERROR]: Gradle - Example error.
-
+
2024-04-25T07:44:20.725613974Z [ERROR]: Gradle - Example error, resolved.
Resolved by: CANT_FIX_ISSUE - Resolved for illustration.
@@ -983,7 +1011,7 @@ Packages
2024-04-25T07:44:20.725613974Z [ERROR]: FakeScanner - Example error.
-
+
2024-04-25T07:44:20.725613974Z [ERROR]: FakeScanner - Example error, resolved.
Resolved by: CANT_FIX_ISSUE - Resolved for illustration.
@@ -991,13 +1019,13 @@ Packages
-
+
2 |
Ant:junit:junit:4.12 |
|
@@ -1023,13 +1051,13 @@ Packages
-
+
3 |
Maven:com.foobar:foobar:1.0 |
|
@@ -1055,13 +1083,13 @@ Packages
-
+
4 |
Maven:com.h2database:h2:1.4.200 |
|
@@ -1087,14 +1115,14 @@ Packages
-
+
5 |
Maven:org.apache.commons:commons-lang3:3.5 |
|
@@ -1115,14 +1143,14 @@ Packages
-
+
6 |
Maven:org.apache.commons:commons-text:1.1 |
|
@@ -1148,14 +1176,14 @@ Packages
-
+
7 |
Maven:org.example.test:component:1.11 |
|
@@ -1167,13 +1195,13 @@ Packages
-
+
8 |
Maven:org.hamcrest:hamcrest-core:1.3 |
|
diff --git a/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt b/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
index 99c0bad422af..9b5b7de99008 100644
--- a/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
+++ b/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
@@ -116,7 +116,8 @@ class StaticHtmlReporter : Reporter {
div {
id = "report-container"
- div("ort-report-label") {
+ div {
+ id = "report-top-label"
+"Scan Report"
}
@@ -184,7 +185,7 @@ class StaticHtmlReporter : Reporter {
private fun DIV.labelsTable(labels: Map) {
h2 { +"Labels" }
- table("ort-report-labels") {
+ table("report-key-value-table") {
tbody { labels.forEach { (key, value) -> labelRow(key, value) } }
}
}
@@ -240,7 +241,7 @@ class StaticHtmlReporter : Reporter {
if (projectTable.isExcluded()) {
projectTable.pathExcludes.forEach { exclude ->
+" "
- div("ort-reason") { +"Excluded: ${exclude.description}" }
+ div("reason") { +"Excluded: ${exclude.description}" }
}
}
}
@@ -264,7 +265,7 @@ class StaticHtmlReporter : Reporter {
if (ruleViolations.isEmpty()) {
+"No rule violations found."
} else {
- table("ort-report-table ort-violations") {
+ table("report-table report-rule-violation-table") {
thead {
tr {
th { +"#" }
@@ -286,12 +287,12 @@ class StaticHtmlReporter : Reporter {
private fun TBODY.ruleViolationRow(rowIndex: Int, ruleViolation: TablesReportViolation) {
val cssClass = if (ruleViolation.isResolved) {
- "ort-resolved"
+ "resolved"
} else {
when (ruleViolation.violation.severity) {
- Severity.ERROR -> "ort-error"
- Severity.WARNING -> "ort-warning"
- Severity.HINT -> "ort-hint"
+ Severity.ERROR -> "error"
+ Severity.WARNING -> "warning"
+ Severity.HINT -> "hint"
}
}
@@ -336,7 +337,7 @@ class StaticHtmlReporter : Reporter {
p { +"Issues from excluded components are not shown in this summary." }
- table("ort-report-table") {
+ table("report-table") {
thead {
tr {
th { +"#" }
@@ -355,9 +356,9 @@ class StaticHtmlReporter : Reporter {
private fun TBODY.issueRow(rowId: String, rowIndex: Int, row: IssueTable.Row) {
val cssClass = when (row.issue.severity) {
- Severity.ERROR -> "ort-error"
- Severity.WARNING -> "ort-warning"
- Severity.HINT -> "ort-hint"
+ Severity.ERROR -> "error"
+ Severity.WARNING -> "warning"
+ Severity.HINT -> "hint"
}
tr(cssClass) {
@@ -386,7 +387,7 @@ class StaticHtmlReporter : Reporter {
}
private fun DIV.projectTable(table: ProjectTable) {
- val excludedClass = "ort-excluded".takeIf { table.isExcluded() }.orEmpty()
+ val excludedClass = "excluded".takeIf { table.isExcluded() }.orEmpty()
h2 {
id = table.id.toCoordinates()
@@ -400,14 +401,14 @@ class StaticHtmlReporter : Reporter {
table.pathExcludes.forEach { exclude ->
p {
- div("ort-reason") { +exclude.description }
+ div("reason") { +exclude.description }
}
}
table.vcs.let { vcsInfo ->
h3(excludedClass) { +"VCS Information" }
- table("ort-report-labels $excludedClass") {
+ table("report-key-value-table $excludedClass") {
tbody {
tr {
td { +"Type" }
@@ -431,7 +432,7 @@ class StaticHtmlReporter : Reporter {
h3(excludedClass) { +"Packages" }
- table("ort-report-table ort-packages $excludedClass") {
+ table("report-table report-project-table $excludedClass") {
thead {
tr {
th { +"#" }
@@ -454,12 +455,12 @@ class StaticHtmlReporter : Reporter {
private fun TBODY.projectRow(projectId: String, rowIndex: Int, row: ProjectTable.Row) {
// Only mark the row as excluded if all scopes the dependency appears in are excluded.
val rowExcludedClass =
- if (row.scopes.isNotEmpty() && row.scopes.all { it.excludes.isNotEmpty() }) "ort-excluded" else ""
+ if (row.scopes.isNotEmpty() && row.scopes.all { it.excludes.isNotEmpty() }) "excluded" else ""
val cssClass = when {
- row.analyzerIssues.containsUnresolved() || row.scanIssues.containsUnresolved() -> "ort-error"
- row.declaredLicenses.isEmpty() && row.detectedLicenses.isEmpty() -> "ort-warning"
- else -> "ort-success"
+ row.analyzerIssues.containsUnresolved() || row.scanIssues.containsUnresolved() -> "error"
+ row.declaredLicenses.isEmpty() && row.detectedLicenses.isEmpty() -> "warning"
+ else -> "success"
}
val rowId = "$projectId-pkg-$rowIndex"
@@ -478,12 +479,12 @@ class StaticHtmlReporter : Reporter {
if (row.scopes.isNotEmpty()) {
ul {
row.scopes.forEach { scope ->
- val excludedClass = if (scope.excludes.isNotEmpty()) "ort-excluded" else ""
+ val excludedClass = if (scope.excludes.isNotEmpty()) "excluded" else ""
li(excludedClass) {
+scope.name
if (scope.excludes.isNotEmpty()) {
+" "
- div("ort-reason") {
+ div("reason") {
+"Excluded: "
+scope.excludes.joinToString { it.description }
}
@@ -535,7 +536,7 @@ class StaticHtmlReporter : Reporter {
}
}
} else {
- div("ort-excluded") {
+ div("excluded") {
+"${license.license} (Excluded: "
+pathExcludes.joinToString { it.description }
+")"
@@ -568,7 +569,7 @@ class StaticHtmlReporter : Reporter {
p { issueDescription(it) }
if (it.isResolved) {
- classes = setOf("ort-resolved")
+ classes = setOf("resolved")
p { +it.resolutionDescription }
}
}
diff --git a/plugins/reporters/static-html/src/main/resources/static-html-reporter.css b/plugins/reporters/static-html/src/main/resources/static-html-reporter.css
index 987a01ee5caf..dbb70cb699b6 100644
--- a/plugins/reporters/static-html/src/main/resources/static-html-reporter.css
+++ b/plugins/reporters/static-html/src/main/resources/static-html-reporter.css
@@ -24,6 +24,10 @@ ul {
padding: 0;
}
+/*
+ * The root tag which contains everything.
+ */
+
#report-container {
background-color: #fff;
border: 1px solid rgba(34, 36, 38, .15);
@@ -32,7 +36,11 @@ ul {
margin: 1em 2em 1em 2em;
}
-.ort-report-label {
+/*
+ * The label at the very top of the report.
+ */
+
+#report-top-label {
background-color: #f9fafb;
border-left: 1px solid rgba(34, 36, 38, .15);
border-right: 1px solid rgba(34, 36, 38, .15);
@@ -51,13 +59,17 @@ ul {
width: 110px;
}
-.ort-report-labels {
+/*
+ * Table for key value pairs with a simple styling. Used for the VCS infos of projects and for the ORT result labels.
+ */
+
+.report-key-value-table {
font-size: 12px;
border-spacing: 0;
table-layout: fixed;
}
-.ort-report-labels td {
+.report-key-value-table td {
border-bottom: 1px solid rgba(34, 36, 38, .15);
overflow: hidden;
padding: 5px 20px 5px 0px;
@@ -65,35 +77,15 @@ ul {
word-wrap: break-word;
}
-.ort-report-labels tr:first-child td {
+.report-key-value-table tr:first-child td {
border-top: 1px solid rgba(34, 36, 38, .15);
}
-.ort-excluded {
- filter: opacity(50%);
-}
-
-.ort-reason {
- border-radius: 3px;
- background: #EEE;
- padding: 2px;
- font-size: 12px;
- display: inline;
-}
+/*
+ * The base class for the main top level tables for violations, issues and projects.
+ */
-table.ort-excluded tr.ort-excluded {
- filter: opacity(100%);
-}
-
-table tr.ort-excluded td li.ort-excluded {
- filter: opacity(100%);
-}
-
-table.ort-excluded tr.ort-excluded td li.ort-excluded {
- filter: opacity(100%);
-}
-
-.ort-report-table {
+.report-table {
border-spacing: 0;
overflow: hidden;
table-layout: fixed;
@@ -101,38 +93,7 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
width: 100%;
}
-.ort-report-table tr:hover {
- background: rgba(34, 36, 38, .15);
-}
-
-.ort-report-table tr.ort-error {
- background: #fff6f6;
- color: #9f3a38;
-}
-
-.ort-report-table tr.ort-warning {
- background: #fffaf3;
- color: #573a08;
-}
-
-.ort-report-table tr.ort-hint {
- background: #f7f5ff;
- color: #1c0859;
-}
-
-.ort-report-table tr:last-child td {
- border-bottom: 1px solid rgba(34, 36, 38, .15);
-}
-
-.ort-report-table tr:last-child td:first-child {
- border-bottom-left-radius: .28rem;
-}
-
-.ort-report-table tr:last-child td:last-child {
- border-bottom-right-radius: .28rem;
-}
-
-.ort-report-table th {
+.report-table th {
background-color: #f9fafb;
border-left: 1px solid rgba(34, 36, 38, .15);
border-top: 1px solid rgba(34, 36, 38, .15);
@@ -143,7 +104,7 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
white-space: nowrap;
}
-.ort-report-table th:first-child {
+.report-table th:first-child {
width: 30px;
white-space: nowrap;
border-top-left-radius: .28rem;
@@ -151,13 +112,25 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
border-top: 1px solid rgba(34, 36, 38, .15);
}
-.ort-report-table th:last-child {
+.report-table th:last-child {
border-top-right-radius: .28rem;
border-right: 1px solid rgba(34, 36, 38, .15);
border-top: 1px solid rgba(34, 36, 38, .15);
}
-.ort-report-table td {
+.report-table tr:last-child td {
+ border-bottom: 1px solid rgba(34, 36, 38, .15);
+}
+
+.report-table tr:last-child td:first-child {
+ border-bottom-left-radius: .28rem;
+}
+
+.report-table tr:last-child td:last-child {
+ border-bottom-right-radius: .28rem;
+}
+
+.report-table td {
border-left: 1px solid rgba(34, 36, 38, .15);
border-top: 1px solid rgba(34, 36, 38, .15);
padding: 8px;
@@ -167,34 +140,89 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
word-wrap: break-word;
}
-.ort-report-table td:last-child {
+.report-table td:last-child {
border-right: 1px solid rgba(34, 36, 38, .15);
}
-.ort-report-table.ort-violations tr.ort-resolved {
+.report-table li.resolved {
+ color: #2c662d;
+}
+
+.report-table details {
+ overflow: scroll;
+}
+
+.report-table tr.error {
+ background: #fff6f6;
+ color: #9f3a38;
+}
+
+.report-table tr.warning {
+ background: #fffaf3;
+ color: #573a08;
+}
+
+.report-table tr.hint {
+ background: #f7f5ff;
+ color: #1c0859;
+}
+
+/**
+ * Rule violation table, which specializes .report-table.
+ */
+
+.report-rule-violation-table tr.resolved {
background: #fcfff5;
color: #2c662d;
}
-.ort-report-table.ort-packages tr.ort-error {
+/**
+ * Project table, which specializes .report-table.
+ */
+
+.report-project-table tr.error {
color: black;
}
-.ort-report-table.ort-packages tr.ort-error td:nth-child(5),
-.ort-report-table.ort-packages tr.ort-error td:nth-child(6) {
+.report-project-table tr.error td:nth-child(5),
+.report-project-table tr.error td:nth-child(6) {
color: #9f3a38;
}
-.ort-report-table li.ort-resolved {
- color: #2c662d;
+/*
+ * Excluded state.
+ */
+
+.excluded {
+ filter: opacity(50%);
}
-.ort-report-table details {
- overflow: scroll;
+.reason {
+ border-radius: 3px;
+ background: #EEE;
+ padding: 2px;
+ font-size: 12px;
+ display: inline;
+}
+
+table.excluded tr.excluded {
+ filter: opacity(100%);
}
+table tr.excluded td li.excluded {
+ filter: opacity(100%);
+}
+
+table.excluded tr.excluded td li.excluded {
+ filter: opacity(100%);
+}
+
+/**
+ * Report table media specific styling.
+ */
+
@media all and (max-width: 1000px) {
- .ort-report-table th:nth-child(2), .ort-report-table td:nth-child(2) {
+ .report-table th:nth-child(2), .report-table td:nth-child(2) {
display: none;
width: 0;
height: 0;
@@ -204,7 +232,7 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
}
@media all and (max-width: 900px) {
- .ort-report-table th:nth-child(3), .ort-report-table td:nth-child(3) {
+ .report-table th:nth-child(3), .report-table td:nth-child(3) {
display: none;
width: 0;
height: 0;
@@ -214,10 +242,10 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
}
@media all and (max-width: 800px) {
- .ort-report-table th:nth-child(5),
- .ort-report-table td:nth-child(5),
- .ort-report-table th:nth-child(6),
- .ort-report-table td:nth-child(6) {
+ .report-table th:nth-child(5),
+ .report-table td:nth-child(5),
+ .report-table th:nth-child(6),
+ .report-table td:nth-child(6) {
display: none;
width: 0;
height: 0;
@@ -225,23 +253,23 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
visibility: collapse;
}
- .ort-report-table th:nth-child(4) {
+ .report-table th:nth-child(4) {
border-top-right-radius: .28rem;
border-right: 1px solid rgba(34, 36, 38, .15);
}
- .ort-report-table td:nth-child(4) {
+ .report-table td:nth-child(4) {
border-right: 1px solid rgba(34, 36, 38, .15);
}
- .ort-report-table tr:last-child td:nth-child(4) {
+ .report-table tr:last-child td:nth-child(4) {
border-bottom-right-radius: .28rem;
}
}
@media all and (max-width: 500px) {
- .ort-report-table th:nth-child(4),
- .ort-report-table td:nth-child(4) {
+ .report-table th:nth-child(4),
+ .report-table td:nth-child(4) {
display: none;
width: 0;
height: 0;
@@ -249,16 +277,16 @@ table.ort-excluded tr.ort-excluded td li.ort-excluded {
visibility: collapse;
}
- .ort-report-table th:first-child {
+ .report-table th:first-child {
border-top-right-radius: .28rem;
border-right: 1px solid rgba(34, 36, 38, .15);
}
- .ort-report-table td:first-child {
+ .report-table td:first-child {
border-right: 1px solid rgba(34, 36, 38, .15);
}
- .ort-report-table tr:last-child td:first-child {
+ .report-table tr:last-child td:first-child {
border-bottom-right-radius: .28rem;
}
}
|