mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-20 00:04:59 +01:00
Initial commit
This commit is contained in:
43
app/views/statistics/vulnerability.scala.html
Normal file
43
app/views/statistics/vulnerability.scala.html
Normal file
@@ -0,0 +1,43 @@
|
||||
@(
|
||||
projectsWithSelection: ProjectsWithSelection,
|
||||
vulnerability: Vulnerability,
|
||||
affectedProjects: Map[ReportInfo, Set[GroupedDependency]],
|
||||
vulnerableDependencies: Set[GroupedDependency],
|
||||
affectedLibraries: Set[PlainLibraryIdentifier]
|
||||
)(implicit header: DefaultRequest)
|
||||
@section = @{views.html.genericSection("vuln")("h2") _}
|
||||
@main(
|
||||
title = s"vulnerability ${vulnerability.name} for ${projectsWithSelection.projectNameText}",
|
||||
projectsOption = Some((projectsWithSelection, p => routes.Statistics.vulnerability(vulnerability.name, p)))
|
||||
) {
|
||||
@if(projectsWithSelection.isProjectSpecified){
|
||||
<div class="alert alert-warning">The vulnerability details are limited to some subset of projects.<br><a class="btn btn-default" href="@routes.Statistics.vulnerability(vulnerability.name, None)">Show it for all projects!</a></div>
|
||||
}
|
||||
@section("details", "Vulnerability details") {
|
||||
@views.html.vulnerability("h2", "vuln-details", vulnerability)
|
||||
}
|
||||
@section("affected-libs", s"Unique affected libraries – without version number (${affectedLibraries.size})"){
|
||||
<ul>
|
||||
@for(lib <- affectedLibraries){
|
||||
<li>@lib</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
@section("affected-deps", s"Unique affected dependencies (${vulnerableDependencies.size})"){
|
||||
<ul>
|
||||
@for(dep <- vulnerableDependencies){
|
||||
<li class="library-identification">@libraryIdentification(dep)</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
@section("affected-projects", s"Affected projects (${affectedProjects.size} projects with ${affectedProjects.flatMap(_._2).size} occurrences)"){
|
||||
@for((project, dependencies) <- affectedProjects.toSeq.sortBy(_._1)){
|
||||
<h3><a href="@routes.Statistics.basic(Some("project:"+project.fullId))">@friendlyProjectName(project)</a> (@dependencies.size)</h3>
|
||||
<ul>
|
||||
@for(dep <- dependencies.toSeq){
|
||||
<li class="library-identification">@libraryIdentification(dep)</li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user