mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-19 07:44:44 +01:00
Keep filter when switching between pages (mostly; does not work in Notifications and Status)
This commit is contained in:
@@ -44,13 +44,14 @@
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="@routes.Statistics.vulnerableLibraries(None)">Vulnerable libraries</a></li>
|
||||
<li><a href="@routes.Statistics.vulnerabilities(None, None)">Vulnerabilities</a></li>
|
||||
<li><a href="@routes.Notifications.listProjects()">Notifications</a></li>
|
||||
@filter = @{projectsOption.flatMap(_._1.selectorString)}
|
||||
<li><a href="@routes.Statistics.vulnerableLibraries(filter)">Vulnerable libraries</a></li>
|
||||
<li><a href="@routes.Statistics.vulnerabilities(filter, None)">Vulnerabilities</a></li>
|
||||
<li><a href="@routes.Notifications.listProjects(filter)">Notifications</a></li>
|
||||
<li><a href="@routes.Application.index(Map())">Status</a></li>
|
||||
<li><a href="#" data-toggle="collapse" data-target=".extended-menu">…</a></li>
|
||||
<li class="collapse extended-menu"><a href="@routes.Application.dependencies(None)">Tags</a></li>
|
||||
<li class="collapse extended-menu"><a href="@routes.Statistics.basic(None)">Tag statistics</a></li>
|
||||
<li class="collapse extended-menu"><a href="@routes.Statistics.basic(filter)">Tag statistics</a></li>
|
||||
<li>
|
||||
@for((ProjectsWithSelection(filter, projects, teams), link) <- projectsOption){
|
||||
<div id="project-selector">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@import helper._
|
||||
@(projects: Seq[ReportInfo], watchedProjects: Set[String], failedReports: Set[String])(implicit req: DefaultRequest)
|
||||
@(projects: Seq[ReportInfo], watchedProjects: Set[String], failedReports: Set[String], filter: Option[String])(implicit req: DefaultRequest)
|
||||
@button(action: Call)(label: String) = {
|
||||
@form(action, 'style -> "display: inline-block"){
|
||||
@CSRF.formField
|
||||
@@ -54,9 +54,9 @@
|
||||
<button disabled class="btn btn-link">unwatch</button>
|
||||
}else{
|
||||
@if(isWatchedDirectly){
|
||||
@button(routes.Notifications.unwatch(project.fullId))("unwatch")
|
||||
@button(routes.Notifications.unwatch(project.fullId, filter))("unwatch")
|
||||
}else{
|
||||
@button(routes.Notifications.watch(project.fullId))("watch")
|
||||
@button(routes.Notifications.watch(project.fullId, filter))("watch")
|
||||
}
|
||||
}
|
||||
@children
|
||||
|
||||
Reference in New Issue
Block a user