aboutsummaryrefslogtreecommitdiff
path: root/table.tmpl
blob: a687df34c1d0413e96b42d21a1290828ed986ebb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
  <head><title>GNU Taler Dashboard</title>
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<style>
body {
  margin-left:1%;
  margin-right:1%;
  font-family:sans-serif;
  font-stretch:condensed;
  font-size: 12pt;
}
table {
  background: white;
  border-collapse: collapse;
}
th, td {
  padding: 8px;
  border: 1px solid #ddd;
  vertical-align: top;
}
td {
  min-width: 10em;
}
th.side {
  color: brown;
  text-align: right;
  max-width: 11em;
}
tr:hover {
  background: #efefef;
}
.feature {
  background: powderblue;
}
.issue {
  background: navajowhite;
}
.minh {
  min-height: 5em;
}
{{template "severity.tmpl"}}
summary {
  display: flex;
  justify-content: space-between;
  gap: 2em;
  align-items: center;
  cursor: pointer;
}
.assignment {
  font-size: smaller;
  color: grey;
}
details {
  max-width: 50vw;
  border-radius: 5px;
  padding: 8px;
  overflow-x: auto;
  white-space: nowrap;
  text-overflow: ellipsis;
}
details[open] {
  position: absolute;
  background: white;
  border: 2px grey solid;
}
details.version {
  max-width: 30vw;
  padding: 5px;
  font-weight: normal;
  overflow: none;
  white-space: normal;
  text-align: justify;
}
.right {
text-align: right;
font-size:0.8em;
}
details[open].feature {
  background: ghostwhite;
  border: 4px powderblue solid;
}
details[open].issue {
  background: ghostwhite;
  border: 4px navajowhite solid;
}

</style></head>
  <body>
    <h1>GNU Taler Dashboard</h1>
    <h2>Table view | <a href="/list">List View</a></h2>
    {{- with .Lasterror }} Last error: {{ . }} {{end }}
    {{- $top := . -}}
    {{- $features := .Features -}}
    {{- $issues := .Issues -}}
    {{- $versions := .VersionsByDate.Sort -}}
    <!--p>
    {{- range $top.Tags -}}<button>{{ . }}</button>{{- end -}}
    </p-->
    <table>
      <tr>
        <th class="side"></th>
        {{- range $version := $versions }}
          <th>
              <details class="version">
              <summary><b>{{ $version.Name }}</b> <span class="right">({{ $version.Timestamp.Format "02 Jan 06"}})</span>
              </summary>
              <div>{{ $version.Description }}</div>
            </details>
            <div class="right">{{ len ($issues.ByTarget $version.Name) }} issues</div>
            <div class="right">{{ len ($features.ByTarget $version.Name) }} features</div>
          </th>
        {{- end}}
      </tr>
      {{- range $cat := $top.Categories }}
      <tr>
        <th class="side">{{ . }}</th>
        {{- range $version := $versions }}

        <td><div class="minh">{{ with $features.ByCategoryAndTarget $cat $version.Name }}
          <details class="feature">
            <summary>
              <div>{{ $l := len .}}{{ if lt 1 $l }}{{ $l }} features{{ else }}1 feature{{ end }}</div>
              <div class="assignment">{{- $unassigned := .Assigned false }}{{if gt $unassigned 0 }}({{ $unassigned}} unassigned){{ end -}}</div>
            </summary>
            {{- $sorter :=  OrderedBy "Handler" "Id" -}}
            {{- range $sorter.Sort . }}
            {{ if .IsHandled }}<span title="assigned to {{.Handler.Name}}">🥷</span>{{else}}<span title="unassigned">❓</span>{{end}}
            <a href="https://bugs.gnunet.org/view.php?id={{.Id}}" target="_blank">{{.Id}}</a>
            <span class="severity-{{.Severity.Name}}">{{.Summary}}</span>
	    {{ with .Children }}(children:
	    {{ range $child := . }}
		    <span class="child"><a href="https://bugs.gnunet.org/view.php?id={{$child.Id}}" target="_blank" title="{{$child.Summary}}">{{$child.Id}}</a> </span>
	    {{ end }})
	    {{ end }}<br>
            {{- end}}
          </details>
          {{- end }}
          {{- with $issues.ByCategoryAndTarget $cat $version.Name }}
          <details class="issue">
            <summary>
              <div>{{ $l := len .}}{{ if lt 1 $l }}{{ $l }} issues{{ else }}1 issue{{ end }}</div>
              <div class="assignment">{{- $unassigned := .Assigned false }}{{if gt $unassigned 0 }} ({{ $unassigned}} unassigned){{ end -}}</div>
            </summary>
            {{- $sorter :=  OrderedBy "Severity" "Handler" "Id" -}}
            {{- range $sorter.Sort . }}
            {{ if .IsHandled }}<span title="assigned to {{.Handler.Name}}">🥷</span>{{else}}<span title="unassigned">❓</span>{{end}}
            <a href="https://bugs.gnunet.org/view.php?id={{.Id}}" target="_blank">{{.Id}}</a>
            <span class="severity-{{.Severity.Name}}" title="severity {{.Severity.Name}}">{{.Summary}}</span><br>
            {{- end}}
          </details>
        {{ end -}}
        </div></td>
        {{ end }}
      </tr>
      {{- end}}
    </table>
    <p>
    Total: {{ len $features }} features and {{ len $issues }} issues.
    <br>Data from {{ .Timestamp.Format "02 Jan 06 15:04 MST"}},
    <br>updated every {{ .Freq }} (no auto-refresh).
    <p>
    <small>taler-dashboard - version: {{.Commit}} - <a href="https://git.kesim.org/taler/taler-dashboard">https://git.kesim.org/taler/taler-dashboard</a> </small>
  </body>
</html>