Added a standalone page for library

This commit is contained in:
Šesták Vít
2017-06-20 01:16:32 +02:00
parent 2d0651cfc7
commit c55c37fa9a
5 changed files with 30 additions and 3 deletions

View File

@@ -312,6 +312,18 @@ class Statistics @Inject()(
}
}
def library(selectorOption: Option[String], depId: Hashes) = ReadAction.async { implicit req =>
val (lastRefreshTime, resultsFuture) = projectReportsProvider.resultsForVersions(versions)
resultsFuture flatMap { allResults =>
select(allResults, selectorOption).fold(Future.successful(notFound())) { selection =>
Future.successful(Ok(views.html.library(
dep = selection.result.groupedDependenciesByHashes(depId),
selectorOption = selectorOption
)))
}
}
}
def affectedProjects(depId: Hashes) = ReadAction.async { implicit req =>
val (lastRefreshTime, resultsFuture) = projectReportsProvider.resultsForVersions(versions)
resultsFuture flatMap { case (successfulResults, failedResults) =>