diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 7f94457..cddaead 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -238,4 +238,8 @@ h3.library-identification{ padding-left: 1em; font-family: 'Glyphicons Halflings'; content: "\e209"; +} + +.sublist{ + padding-left: 23px; } \ No newline at end of file diff --git a/app/controllers/Statistics.scala b/app/controllers/Statistics.scala index 5faa382..59f7733 100644 --- a/app/controllers/Statistics.scala +++ b/app/controllers/Statistics.scala @@ -312,6 +312,16 @@ class Statistics @Inject()( } } + def affectedProjects(depId: Hashes) = ReadAction.async { implicit req => + val (lastRefreshTime, resultsFuture) = projectReportsProvider.resultsForVersions(versions) + resultsFuture flatMap { case (successfulResults, failedResults) => + val selection = dependencyCheckReportsParser.parseReports(successfulResults, failedResults) + Future.successful(Ok(views.html.affectedProjects( + dep = selection.groupedDependenciesByHashes(depId) + )).withHeaders("Content-type" -> "text/plain; charset=utf-8")) + } + } + def allFiles(selectorOption: Option[String]) = ReadAction.async { implicit req => val (lastRefreshTime, resultsFuture) = projectReportsProvider.resultsForVersions(versions) resultsFuture flatMap { allResults => diff --git a/app/views/affectedProjects.scala.html b/app/views/affectedProjects.scala.html new file mode 100644 index 0000000..20f7dea --- /dev/null +++ b/app/views/affectedProjects.scala.html @@ -0,0 +1,6 @@ +@(dep: GroupedDependency) + diff --git a/app/views/dependencyDetailsInner.scala.html b/app/views/dependencyDetailsInner.scala.html index 118bd1b..38f1948 100644 --- a/app/views/dependencyDetailsInner.scala.html +++ b/app/views/dependencyDetailsInner.scala.html @@ -63,7 +63,19 @@ - +
+ + @if(selectorOption.isDefined){ + +
+ } +