From dec70c98a8c80548943ca8cf8e47e8c04b9299d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Kesim?= Date: Fri, 27 Sep 2024 12:12:55 +0200 Subject: [PATCH] added no. of issues and features to column header --- issues.go | 10 ++++++++++ table.tmpl | 15 ++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/issues.go b/issues.go index 3c49b4c..3bda1fd 100644 --- a/issues.go +++ b/issues.go @@ -212,6 +212,16 @@ func (i Issues) ByCategory(cat string) (issues Issues) { return issues } +func (i Issues) ByTarget(tar string) (issues Issues) { + for _, is := range i { + if is.TargetVersion.Name == tar { + issues = append(issues, is) + } + } + sort.Sort(sort.Reverse(ByHandlerAndId(issues))) + return +} + func (i Issues) ByCategoryAndTarget(cat, tar string) (issues Issues) { for _, is := range i { if is.TargetVersion.Name == tar && diff --git a/table.tmpl b/table.tmpl index 17dddc7..a687df3 100644 --- a/table.tmpl +++ b/table.tmpl @@ -9,11 +9,11 @@ body { font-stretch:condensed; font-size: 12pt; } -table { +table { background: white; border-collapse: collapse; } -th, td { +th, td { padding: 8px; border: 1px solid #ddd; vertical-align: top; @@ -21,9 +21,9 @@ th, td { td { min-width: 10em; } -th.side { +th.side { color: brown; - text-align: right; + text-align: right; max-width: 11em; } tr:hover { @@ -83,6 +83,7 @@ details[open].issue { background: ghostwhite; border: 4px navajowhite solid; } +

GNU Taler Dashboard

@@ -101,9 +102,12 @@ details[open].issue { {{- range $version := $versions }}
- {{ $version.Name }} ({{ $version.Timestamp.Format "02 Jan 06"}}) + {{ $version.Name }} ({{ $version.Timestamp.Format "02 Jan 06"}}) +
{{ $version.Description }}
+
{{ len ($issues.ByTarget $version.Name) }} issues
+
{{ len ($features.ByTarget $version.Name) }} features
{{- end}} @@ -111,6 +115,7 @@ details[open].issue { {{ . }} {{- range $version := $versions }} +
{{ with $features.ByCategoryAndTarget $cat $version.Name }}