diff options
author | Max Magorsch <arzano@gentoo.org> | 2020-10-06 21:58:28 +0000 |
---|---|---|
committer | Max Magorsch <arzano@gentoo.org> | 2020-10-06 21:58:28 +0000 |
commit | d4016362a59f467fb04bf179b70acc501656868a (patch) | |
tree | c0b37258c5ed8fbf08edf42ea59767cfb90b3c1d /web | |
parent | Enable the link to the user preferences (diff) | |
download | soko-d4016362a59f467fb04bf179b70acc501656868a.tar.gz soko-d4016362a59f467fb04bf179b70acc501656868a.tar.bz2 soko-d4016362a59f467fb04bf179b70acc501656868a.zip |
Fix bugs that are displayed multiple times
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'web')
-rw-r--r-- | web/templates/maintainer/components/bugs.tmpl | 106 | ||||
-rw-r--r-- | web/templates/maintainer/components/security.tmpl | 29 | ||||
-rw-r--r-- | web/templates/maintainer/components/stabilization.tmpl | 54 |
3 files changed, 87 insertions, 102 deletions
diff --git a/web/templates/maintainer/components/bugs.tmpl b/web/templates/maintainer/components/bugs.tmpl index b81c2a4..f069dad 100644 --- a/web/templates/maintainer/components/bugs.tmpl +++ b/web/templates/maintainer/components/bugs.tmpl @@ -3,28 +3,24 @@ <div class="col-md-9"> {{$security_bugs := 0}} {{$non_security_bugs := 0}} - {{range .Packages}} - {{range .AllBugs}} - {{if eq .Component "Vulnerabilities"}} - {{$security_bugs = (add $security_bugs 1)}} - {{else}} - {{$non_security_bugs = (add $non_security_bugs 1)}} - {{end}} + {{range getAllBugs .Packages}} + {{if eq .Component "Vulnerabilities"}} + {{$security_bugs = (add $security_bugs 1)}} + {{else}} + {{$non_security_bugs = (add $non_security_bugs 1)}} {{end}} {{end}} {{$general_bugs := 0}} {{$stabilization_bugs := 0}} {{$keywording_bugs := 0}} - {{range .Packages}} - {{range .AllBugs}} - {{if eq .Component "Current packages"}} - {{$general_bugs = (add $general_bugs 1)}} - {{else if eq .Component "Stabilization"}} - {{$stabilization_bugs = (add $stabilization_bugs 1)}} - {{else if eq .Component "Keywording"}} - {{$keywording_bugs = (add $keywording_bugs 1)}} - {{end}} + {{range getAllBugs .Packages}} + {{if eq .Component "Current packages"}} + {{$general_bugs = (add $general_bugs 1)}} + {{else if eq .Component "Stabilization"}} + {{$stabilization_bugs = (add $stabilization_bugs 1)}} + {{else if eq .Component "Keywording"}} + {{$keywording_bugs = (add $keywording_bugs 1)}} {{end}} {{end}} @@ -34,21 +30,19 @@ {{if $general_bugs}} <h3 id="packages" class="mb-4">Bug Reports</h3> <ul class="list-group"> - {{range .Packages}} - {{range .AllBugs}} - {{if eq .Component "Current packages"}} - <li class="list-group-item"> - <div class="row"> - <div class="col-md-12"> - <i class="fa fa-bug" aria-hidden="true"></i> - <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> - </div> - <div class="col-md-12 text-muted"> - {{.Id}} - Assigned to {{.Assignee}} - </div> + {{range getAllBugs .Packages}} + {{if eq .Component "Current packages"}} + <li class="list-group-item"> + <div class="row"> + <div class="col-md-12"> + <i class="fa fa-bug" aria-hidden="true"></i> + <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> </div> - </li> - {{end}} + <div class="col-md-12 text-muted"> + {{.Id}} - Assigned to {{.Assignee}} + </div> + </div> + </li> {{end}} {{end}} </ul> @@ -57,21 +51,19 @@ {{if $stabilization_bugs}} <h3 id="stabilization" class="my-4">Stabilization Bug Reports</h3> <ul class="list-group"> - {{range .Packages}} - {{range .AllBugs}} - {{if eq .Component "Stabilization"}} - <li class="list-group-item"> - <div class="row"> - <div class="col-md-12"> - <i class="fa fa-bug" aria-hidden="true"></i> - <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> - </div> - <div class="col-md-12 text-muted"> - {{.Id}} - Assigned to {{.Assignee}} - </div> + {{range getAllBugs .Packages}} + {{if eq .Component "Stabilization"}} + <li class="list-group-item"> + <div class="row"> + <div class="col-md-12"> + <i class="fa fa-bug" aria-hidden="true"></i> + <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> + </div> + <div class="col-md-12 text-muted"> + {{.Id}} - Assigned to {{.Assignee}} </div> - </li> - {{end}} + </div> + </li> {{end}} {{end}} </ul> @@ -80,21 +72,19 @@ {{if $keywording_bugs}} <h3 id="keywording" class="my-4">Keywording Bug Reports</h3> <ul class="list-group"> - {{range .Packages}} - {{range .AllBugs}} - {{if eq .Component "Keywording"}} - <li class="list-group-item"> - <div class="row"> - <div class="col-md-12"> - <i class="fa fa-bug" aria-hidden="true"></i> - <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> - </div> - <div class="col-md-12 text-muted"> - {{.Id}} - Assigned to {{.Assignee}} - </div> + {{range getAllBugs .Packages}} + {{if eq .Component "Keywording"}} + <li class="list-group-item"> + <div class="row"> + <div class="col-md-12"> + <i class="fa fa-bug" aria-hidden="true"></i> + <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> + </div> + <div class="col-md-12 text-muted"> + {{.Id}} - Assigned to {{.Assignee}} </div> - </li> - {{end}} + </div> + </li> {{end}} {{end}} </ul> diff --git a/web/templates/maintainer/components/security.tmpl b/web/templates/maintainer/components/security.tmpl index fae6c8d..521e62d 100644 --- a/web/templates/maintainer/components/security.tmpl +++ b/web/templates/maintainer/components/security.tmpl @@ -6,21 +6,22 @@ <h3 class="mb-4">Security Bug Reports</h3> <ul class="list-group"> - {{range .Packages}} - {{range .AllBugs}} - {{if eq .Component "Vulnerabilities"}} - <li class="list-group-item"> - <div class="row"> - <div class="col-md-12"> - <i class="fa fa-bug" aria-hidden="true"></i> - <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> - </div> - <div class="col-md-12 text-muted"> - {{.Id}} - Assigned to {{.Assignee}} - </div> + hi + {{getAllBugs .Packages}} + hoi2 + {{range (getAllBugs .Packages)}} + {{if eq .Component "Vulnerabilities"}} + <li class="list-group-item"> + <div class="row"> + <div class="col-md-12"> + <i class="fa fa-bug" aria-hidden="true"></i> + <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> </div> - </li> - {{end}} + <div class="col-md-12 text-muted"> + {{.Id}} - Assigned to {{.Assignee}} + </div> + </div> + </li> {{end}} {{end}} </ul> diff --git a/web/templates/maintainer/components/stabilization.tmpl b/web/templates/maintainer/components/stabilization.tmpl index daaca85..7026be5 100644 --- a/web/templates/maintainer/components/stabilization.tmpl +++ b/web/templates/maintainer/components/stabilization.tmpl @@ -34,28 +34,24 @@ {{$security_bugs := 0}} {{$non_security_bugs := 0}} - {{range .Packages}} - {{range .Bugs}} - {{if eq .Component "Vulnerabilities"}} - {{$security_bugs = (add $security_bugs 1)}} - {{else}} - {{$non_security_bugs = (add $non_security_bugs 1)}} - {{end}} + {{range getAllBugs .Packages}} + {{if eq .Component "Vulnerabilities"}} + {{$security_bugs = (add $security_bugs 1)}} + {{else}} + {{$non_security_bugs = (add $non_security_bugs 1)}} {{end}} {{end}} {{$general_bugs := 0}} {{$stabilization_bugs := 0}} {{$keywording_bugs := 0}} - {{range .Packages}} - {{range .Bugs}} - {{if eq .Component "Current packages"}} - {{$general_bugs = (add $general_bugs 1)}} - {{else if eq .Component "Stabilization"}} - {{$stabilization_bugs = (add $stabilization_bugs 1)}} - {{else if eq .Component "Keywording"}} - {{$keywording_bugs = (add $keywording_bugs 1)}} - {{end}} + {{range getAllBugs .Packages}} + {{if eq .Component "Current packages"}} + {{$general_bugs = (add $general_bugs 1)}} + {{else if eq .Component "Stabilization"}} + {{$stabilization_bugs = (add $stabilization_bugs 1)}} + {{else if eq .Component "Keywording"}} + {{$keywording_bugs = (add $keywording_bugs 1)}} {{end}} {{end}} @@ -64,21 +60,19 @@ {{if $stabilization_bugs}} <h3 id="stabilization" class="my-4">Stabilization Bug Reports</h3> <ul class="list-group"> - {{range .Packages}} - {{range .Bugs}} - {{if eq .Component "Stabilization"}} - <li class="list-group-item"> - <div class="row"> - <div class="col-md-12"> - <i class="fa fa-bug" aria-hidden="true"></i> - <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> - </div> - <div class="col-md-12 text-muted"> - {{.Id}} - Assigned to {{.Assignee}} - </div> + {{range getAllBugs .Packages}} + {{if eq .Component "Stabilization"}} + <li class="list-group-item"> + <div class="row"> + <div class="col-md-12"> + <i class="fa fa-bug" aria-hidden="true"></i> + <a href="https://bugs.gentoo.org/{{.Id}}" class="text-dark"><b>{{.Summary}}</b></a> </div> - </li> - {{end}} + <div class="col-md-12 text-muted"> + {{.Id}} - Assigned to {{.Assignee}} + </div> + </div> + </li> {{end}} {{end}} </ul> |