-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcommitfest.html
More file actions
158 lines (151 loc) · 7.83 KB
/
commitfest.html
File metadata and controls
158 lines (151 loc) · 7.83 KB
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
{%extends "base.html"%}
{%load commitfest %}
{%block contents%}
<button type="button" class="btn btn-secondary active" id="filterButton" onClick="togglePatchFilterButton('filterButton', 'collapseFilters')">Search/filter</button>
<a class="btn btn-secondary{% if request.GET.reviewer == '-2' %} active{% endif %}" href="?reviewer=-2">No reviewers</a>
<a class="btn btn-secondary{% if request.GET.author == '-3' %} active{% endif %}" href="?author=-3">My patches</a>
<a class="btn btn-secondary{% if request.GET.reviewer == '-3' %} active{% endif %}" href="?reviewer=-3">My reviews</a>
{%if cf.is_open or user.is_staff %}
<a class="btn btn-secondary" href="new/">New patch</a>
{%endif%}
{%include "filter_form.html" %}
<p>
<br/>
<b>Status summary: </b>{%for id,title,num in statussummary%}<a href="?status={{id}}">{{title}}</a>: {{num}}. {%endfor%}
</p>
{%for p in patches %}
{%ifchanged p.is_open%}
{%if not forloop.first%}
</tbody>
</table>
{%endif%}
<h3>{{p.is_open|yesno:"Active patches,Closed patches"}}</h3>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(5);">Patch</a>{%if sortkey == 5%}<div style="float:right;"><i class="bi bi-sort-alpha-down"></i></div>{%elif sortkey == -5%}<div style="float:right;"><i class="bi bi-sort-alpha-up"></i></div>{%endif%}</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(4);">ID</a>{%if sortkey == 4%}<div style="float:right;"><i class="bi bi-sort-numeric-down"></i></div>{%elif sortkey == -4%}<div style="float:right;"><i class="bi bi-sort-numeric-up"></i></div>{%endif%}</th>
<th>Status</th>
<th>Tags</th>
<th>Ver</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(7);">CI status</a>{%if sortkey == 7%}<div style="float:right;"><i class="bi bi-sort-down-alt"></i></div>{%elif sortkey == -7%}<div style="float:right;"><i class="bi bi-sort-up-alt"></i></div>{%endif%}</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(6);">Stats</a>{%if sortkey == 6%}<div style="float:right;"><i class="bi bi-sort-numeric-down"></i></div>{%elif sortkey == -6%}<div style="float:right;"><i class="bi bi-sort-numeric-up"></i></div>{%endif%}</th>
<th>Author</th>
<th>Reviewers</th>
<th>Committer</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(3);">Num cfs</a>{%if sortkey == 3%}<div style="float:right;"><i class="bi bi-sort-numeric-down-alt"></i></div>{%elif sortkey == -3%}<div style="float:right;"><i class="bi bi-sort-numeric-up-alt"></i></div>{%endif%}</th>
<th><a href="#" style="color:#333333;" onclick="return sortpatches(2);">Latest mail</a>{%if sortkey == 2%}<div style="float:right;"><i class="bi bi-sort-down"></i></div>{%elif sortkey == -2%}<div style="float:right;"><i class="bi bi-sort-up"></i></div>{%endif%}</th>
{%if user.is_staff%}
<th>Select</th>
{%endif%}
</tr>
</thead>
<tbody>
{%endifchanged%}
<tr>
<td><a href="/patch/{{p.id}}/">{{p.name}}</a></td>
<td>{{p.id}}</td>
<td><span class="badge bg-{{p.status|patchstatuslabel}}">{{p.status|patchstatusstring}}</span></td>
<td style="width: min-content;">
{%for t in p.tag_ids%}
<a href="?tag={{t}}">
<span class="badge" style="background-color: {{all_tags|tagcolor:t}};" title="{{all_tags|tagdescription:t}}">{{all_tags|tagname:t}}</span>
</a>
{%endfor%}
</td>
<td>{%if p.targetversion%}<span class="badge bg-secondary">{{p.targetversion}}</span>{%endif%}</td>
<td class="cfbot-summary">
{%with p.cfbot_results as cfb%}
{%if not cfb %}
<span class="badge bg-secondary">Not processed</span>
{%elif p.needs_rebase_since %}
<a href="{{cfb.apply_url}}" title="View git apply logs. Needs rebase {% cfsince p.needs_rebase_since %}. {%if p.failing_since and p.failing_since != p.needs_rebase_since %}Failing {% cfsince p.failing_since %}.{%endif%}">
<span class="badge bg-warning">Needs rebase!</span>
</a>
{%else%}
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{p.id}}~1...cf/{{p.id}}" title="View last patch set on GitHub"><img class="github-logo" src="/media/commitfest/github-mark.svg"/></a>
<a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F{{p.id}}"
title="View CI history. {%if p.failing_since%}Failing {% cfsince p.failing_since %}. {%endif%}{%if cfb.failed_task_names %}Failed jobs: {{cfb.failed_task_names}}{%endif%}">
{%if cfb.branch_status == 'failed' or cfb.branch_status == 'timeout' or cfb.failed_non_formatting > 0 %}
<img src="/media/commitfest/new_failure.svg"/>
{%elif cfb.failed > 0 %}
<img src="/media/commitfest/formatting_failure.svg"/>
{%elif cfb.completed < cfb.total %}
<img src="/media/commitfest/running.svg"/>
{%else%}
<img src="/media/commitfest/new_success.svg"/>
{%endif%}
<span class="run-counters">
{{cfb.completed}}/{{cfb.total}}
</span>
</a>
{%endif%}
</td>
<td>
{%if cfb and cfb.all_additions is not none %}
<span class="additions">+{{ cfb.all_additions }}</span><span class="deletions">−{{ cfb.all_deletions }}</span>
{%endif%}
</td>
{%endwith%}
<td>{{p.author_names|default:''}}</td>
<td>{{p.reviewer_names|default:''}}</td>
<td>{{p.committer|default:''}}</td>
<td>{{p.num_cfs}}</td>
<td style="white-space: nowrap;" title="{{p.lastmail}}">{%if p.lastmail and userprofile.show_relative_timestamps %}{% cfwhen p.lastmail %}{%elif p.lastmail %}{{p.lastmail|date:"Y-m-d"}}<br/>{{p.lastmail|date:"H:i"}}{%endif%}</td>
{%if user.is_staff%}
<td style="white-space: nowrap;"><input type="checkbox" class="sender_checkbox" id="send_authors_{{p.id}}">Author<br/><input type="checkbox" class="sender_checkbox" id="send_reviewers_{{p.id}}">Reviewer</td>
{%endif%}
</tr>
{%if forloop.last%}
</tbody>
</table>
{%endif%}
{%endfor%}
<div>
{%if cf.is_open or user.is_staff %}
<a class="btn btn-secondary" href="new/">New patch</a>
{%endif%}
{%if user.is_staff%}
<div class="btn-group dropup">
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Send private mail</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="javascript:send_selected()">Selected</a></li>
<li><a class="dropdown-item" href="send_email/?reviewers={{openpatchids|join:","}}">All reviewers (open patches)</a></li>
<li><a class="dropdown-item" href="send_email/?authors={{openpatchids|join:","}}">All authors (open patches)</a></li>
<li><a class="dropdown-item" href="send_email/?authors={{openpatchids|join:","}}&reviewers={{openpatchids|join:","}}">All authors and reviewers (open patches)</a></li>
</ul>
</div>
<div class="btn-group dropup">
<button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Reports</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="reports/authorstats/">Author stats</a></li>
</ul>
</div>
{%endif%}
</div>
{%endblock%}
{%block morescript%}
{%include "selectize_js.html" %}
<script>
{%if user.is_staff%}
function send_selected() {
var authors = [];
var reviewers = [];
$('input.sender_checkbox').each(function(index, el) {
if (el.checked) {
if (el.id.indexOf('send_authors_') == 0) {
authors.push(el.id.substring(13));
} else {
reviewers.push(el.id.substring(15));
}
}
});
if (authors.length==0 && reviewers.length==0) {
alert('Nothing to send.');
return;
}
document.location.href = 'send_email/?authors=' + authors.join(',') + '&reviewers=' + reviewers.join(',');
}
{%endif%}
</script>
{%endblock%}