diff --git a/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html b/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html index e21285f8af8d..8de1dad1f4c4 100644 --- a/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html +++ b/plugins/reporters/static-html/src/funTest/assets/static-html-reporter-test-expected-output.html @@ -32,6 +32,10 @@ padding: 0; } +/* + * The root tag which contains everything. + */ + #report-container { background-color: #fff; border: 1px solid rgba(34, 36, 38, .15); @@ -40,7 +44,11 @@ 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); @@ -59,13 +67,17 @@ 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; @@ -73,35 +85,15 @@ 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; -} - -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%); -} +/* + * The base class for the main top level tables for violations, issues and projects. + */ -.ort-report-table { +.report-table { border-spacing: 0; overflow: hidden; table-layout: fixed; @@ -109,38 +101,7 @@ 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); @@ -151,7 +112,7 @@ white-space: nowrap; } -.ort-report-table th:first-child { +.report-table th:first-child { width: 30px; white-space: nowrap; border-top-left-radius: .28rem; @@ -159,13 +120,25 @@ 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; @@ -175,34 +148,89 @@ 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; @@ -212,7 +240,7 @@ } @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; @@ -222,10 +250,10 @@ } @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; @@ -233,23 +261,23 @@ 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; @@ -257,16 +285,16 @@ 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; } } @@ -422,12 +450,12 @@ var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof M)){if(f&&y!=a.length-1){if(c.lastIndex=v,!(x=c.exec(e)))break;for(var b=x.index+(h?x[1].length:0),w=x.index+x[0].length,A=y,P=v,O=a.length;A"+t.content+""},!g.document)return g.addEventListener&&(C.disableWorkerMessageHandler||g.addEventListener("message",function(e){var a=JSON.parse(e.data),t=a.language,n=a.code,r=a.immediateClose;g.postMessage(C.highlight(n,C.languages[t],t)),r&&g.close()},!1)),C;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(C.filename=e.src,C.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(C.highlightAll):window.setTimeout(C.highlightAll,16):document.addEventListener("DOMContentLoaded",C.highlightAll))),C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},boolean:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},null:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},Prism.languages.yml=Prism.languages.yaml;
-
Scan Report
+
Scan Report
Created by ORT, the OSS Review Toolkit, version on .

Project

Scanned revision master of Git repository https://github.com/oss-review-toolkit/ort.git

Labels

- +
@@ -458,12 +486,12 @@

Index

  • Scanner Issue Summary (3 errors, 1 warnings, 1 hints to resolve)
  • Advisor Issue Summary (1 errors, 1 warnings, 1 hints to resolve)
  • Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0 -
    Excluded: EXAMPLE_OF - The project is an example.
  • +
    Excluded: EXAMPLE_OF - The project is an example.
  • Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0
  • Repository Configuration
  • Rule Violation Summary (1 errors, 1 warnings, 0 hints to resolve)

    -
    JOB_PARAM_1
    +
    @@ -474,7 +502,7 @@

    Rule Violation Summary (1 errors, 1 warnings, 0

    - + @@ -497,7 +525,7 @@

    Rule Violation Summary (1 errors, 1 warnings, 0

    - + @@ -520,7 +548,7 @@

    Rule Violation Summary (1 errors, 1 warnings, 0

    - + @@ -535,7 +563,7 @@

    Rule Violation Summary (1 errors, 1 warnings, 0

    #
    1 rule 1 Ant:junit:junit:4.12
    2 rule 3 Maven:org.hamcrest:hamcrest-core:1.3
    3 rule 2 Maven:org.apache.commons:commons-text:1.1

    Analyzer Issue Summary (1 errors, 2 warnings, 1 hints to resolve)

    Issues from excluded components are not shown in this summary.

    - +
    @@ -544,7 +572,7 @@

    Analyzer Issue Summary (1 errors, 2 warnings, 1

    - + - + - + - +
    #
    1 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -563,7 +591,7 @@

    Analyzer Issue Summary (1 errors, 2 warnings, 1

    2 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -582,7 +610,7 @@

    Analyzer Issue Summary (1 errors, 2 warnings, 1

    3 Maven:org.apache.commons:commons-text:1.1 @@ -602,7 +630,7 @@

    Analyzer Issue Summary (1 errors, 2 warnings, 1

    4 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -625,7 +653,7 @@

    Analyzer Issue Summary (1 errors, 2 warnings, 1

    Scanner Issue Summary (3 errors, 1 warnings, 1 hints to resolve)

    Issues from excluded components are not shown in this summary.

    - +
    @@ -634,7 +662,7 @@

    Scanner Issue Summary (3 errors, 1 warnings, 1 hi

    - + - + - + - + - +
    #
    1 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -655,7 +683,7 @@

    Scanner Issue Summary (3 errors, 1 warnings, 1 hi

    2 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -675,7 +703,7 @@

    Scanner Issue Summary (3 errors, 1 warnings, 1 hi

    3 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -694,7 +722,7 @@

    Scanner Issue Summary (3 errors, 1 warnings, 1 hi

    4 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -713,7 +741,7 @@

    Scanner Issue Summary (3 errors, 1 warnings, 1 hi

    5 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 @@ -736,7 +764,7 @@

    Scanner Issue Summary (3 errors, 1 warnings, 1 hi

    Advisor Issue Summary (1 errors, 1 warnings, 1 hints to resolve)

    Issues from excluded components are not shown in this summary.

    - +
    @@ -745,7 +773,7 @@

    Advisor Issue Summary (1 errors, 1 warnings, 1 hi

    - + - + - +
    #
    1 Maven:org.apache.commons:commons-text:1.1 @@ -764,7 +792,7 @@

    Advisor Issue Summary (1 errors, 1 warnings, 1 hi

    2 Maven:org.apache.commons:commons-text:1.1 @@ -783,7 +811,7 @@

    Advisor Issue Summary (1 errors, 1 warnings, 1 hi

    3 Maven:org.apache.commons:commons-text:1.1 @@ -808,10 +836,10 @@

    Gradle:org.ossrev

    Project is Excluded

    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

    +
    @@ -831,8 +859,8 @@

    VCS Information

    Type
    -

    Packages

    - +

    Packages

    +
    @@ -844,7 +872,7 @@

    Packages

    - + @@ -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

  • #
    1 Gradle:org.ossreviewtoolkit:nested-fake-project:1.0.0

    Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0 (analyzer/src/funTest/assets/projects/synthetic/gradle/lib/build.gradle)

    VCS Information

    - +
    @@ -915,7 +943,7 @@

    VCS Information

    Type

    Packages

    - +
    @@ -927,7 +955,7 @@

    Packages

    - + @@ -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

  • - + @@ -1023,13 +1051,13 @@

    Packages

      - + @@ -1055,13 +1083,13 @@

      Packages

        - + @@ -1087,14 +1115,14 @@

        Packages

          - + @@ -1115,14 +1143,14 @@

          Packages

            - + @@ -1148,14 +1176,14 @@

            Packages

              - + @@ -1167,13 +1195,13 @@

              Packages

                - + 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; } }
                #
                1 Gradle:org.ossreviewtoolkit.gradle.example:lib:1.0.0
                2 Ant:junit:junit:4.12
                  -
                • testCompile -
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                  +
                • testCompile +
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                3 Maven:com.foobar:foobar:1.0
                  -
                • testCompile -
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                  +
                • testCompile +
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                4 Maven:com.h2database:h2:1.4.200
                  -
                • testCompile -
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                  +
                • testCompile +
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                5 Maven:org.apache.commons:commons-lang3:3.5
                • compile
                • -
                • testCompile -
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                  +
                • testCompile +
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                6 Maven:org.apache.commons:commons-text:1.1
                • compile
                • -
                • testCompile -
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                  +
                • testCompile +
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                7 Maven:org.example.test:component:1.11
                • compile
                • -
                • testCompile -
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                  +
                • testCompile +
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                8 Maven:org.hamcrest:hamcrest-core:1.3
                  -
                • testCompile -
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.
                  +
                • testCompile +
                  Excluded: TEST_DEPENDENCY_OF - The scope only contains test dependencies.