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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
|
{%extends "base.html"%}
{%load commitfest%}
{%block contents%}
{%include "patch_commands.inc"%}
<table class="table table-bordered">
<tbody>
<tr>
<th>ID</th>
<td><a href="/https/git.postgresql.org/patch/{{patch.id}}">{{patch.id}}</a></td>
</tr>
<tr>
<th>Title</th>
<td>{{patch.name}}</td>
</tr>
<tr>
<th>Topic</th>
<td>{{patch.topic}}</td>
</tr>
<tr>
<th>Created</th>
<td>{{patch.created}}</td>
</tr>
<tr>
<th style="white-space: nowrap;">Last modified</th>
<td>{{patch.modified}} ({{patch.modified|timesince}} ago)</td>
</tr>
<tr>
<th style="white-space: nowrap;">Latest email</th>
<td>{%if patch.lastmail%}{{patch.lastmail}} ({{patch.lastmail|timesince}} ago){%endif%}</td>
</tr>
<tr>
<th>Status</th>
<td>{%for c in patch_commitfests %}
<div style="margin-bottom: 3px;"><a href="/{{c.commitfest.id}}/{{patch.id}}/">{{c.commitfest}}</a>: <span class="label label-{{c.status|patchstatuslabel}}">{{c.statusstring}}</span></div>
{%endfor%}
</td>
</tr>
<tr>
<th>Target version</th>
<td>{%if patch.targetversion%}<span class="label label-default">{{patch.targetversion}}</span>{%endif%}</td>
</tr>
<tr>
<th>Authors</th>
<td>{{patch.authors_string}}</td>
</tr>
<tr>
<th>Reviewers</th>
<td>{{patch.reviewers_string}}<a href="reviewer/{{is_reviewer|yesno:"remove,become"}}/" class="btn btn-default pull-right">{{is_reviewer|yesno:"Remove from reviewers,Become reviewer"}}</a></td>
</tr>
<tr>
<th>Committer</th>
<td>{%if patch.committer%}{{patch.committer.fullname}}{%endif%}
{%if is_committer%}<a href="committer/{{is_this_committer|yesno:"remove,become"}}/" class="btn btn-default pull-right">{{is_this_committer|yesno:"Unclaim as committer,Claim as committer"}}</a>{%endif%}
</td>
</tr>
<tr>
<th>Links</th>
<td style="white-space:pre-line"><a href="https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F{{patch.id}}">CFbot results (CirrusCI)</a>
<a href="https://github.com/postgresql-cfbot/postgresql/compare/cf/{{patch.id}}~1...cf/{{patch.id}}">CFbot GitHub</a>{%if patch.wikilink%}
<a href="{{patch.wikilink}}">Wiki</a>{%endif%}{%if patch.gitlink%}
<a href="{{patch.gitlink}}">Git</a>
{%endif%}</td>
</tr>
<tr>
<th>Checkout latest CFbot patchset</th>
<td>
Go to your local checkout of the PostgreSQL repository and run:
<pre><code>git remote add commitfest https://github.com/postgresql-cfbot/postgresql.git
git fetch commitfest cf/{{patch.id}}
git checkout commitfest/cf/{{patch.id}}</code></pre>
</td>
</tr>
<tr>
<th>Emails</th>
<td>
{%if user.is_authenticated%}
<div style="float:right"><button class="btn btn-default" onclick="attachThread({{cf.id}},{{patch.id}})">Attach thread</button></div>
{%else%}
<div style="float:right"><button class="btn btn-default" onclick="location.href='/https/git.postgresql.org/account/login/?next=/{{cf.id}}/{{patch.id}}/%3Fattachthreadnow'">Attach thread</button></div>
{%endif%}
<dl>
{%for t in patch.mailthread_set.all%}
<dt><a href="https://www.postgresql.org/message-id/flat/{{t.messageid}}">{{t.subject}}</a> <button type="button" class="close close-nofloat" title="Detach this thread" onclick="detachThread({{cf.id}},{{patch.id}},'{{t.messageid}}')">×</button></dt>
<dd>
First at <a href="https://www.postgresql.org/message-id/{{t.messageid}}">{{t.firstmessage}}</a> by {{t.firstauthor|hidemail}}<br/>
Latest at <a href="https://www.postgresql.org/message-id/{{t.latestmsgid}}">{{t.latestmessage}}</a> by {{t.latestauthor|hidemail}}<br/>
{%for ta in t.mailthreadattachment_set.all%}
{%if forloop.first%}
Latest attachment (<a href="https://www.postgresql.org/message-id/attachment/{{ta.attachmentid}}/{{ta.filename}}">{{ta.filename}}</a>) at <a href="https://www.postgresql.org/message-id/{{ta.messageid}}">{{ta.date}}</a> from {{ta.author|hidemail}} <button type="button" class="btn btn-default btn-xs" data-toggle="collapse" data-target="#att{{t.pk}}" title="Show all attachments"><i class="glyphicon glyphicon-plus"></i></button>
<div id="att{{t.pk}}" class="collapse">
{%endif%}
Attachment (<a href="https://www.postgresql.org/message-id/attachment/{{ta.attachmentid}}/{{ta.filename}}">{{ta.filename}}</a>) at <a href="https://www.postgresql.org/message-id/{{ta.messageid}}">{{ta.date}}</a> from {{ta.author|hidemail}} (Patch: {{ta.ispatch|yesno:"Yes,No,Pending check"}})<br/>
{%if forloop.last%}</div>{%endif%}
{%endfor%}
<div>
{%for a in t.mailthreadannotation_set.all%}
{%if forloop.first%}
<h4>Annotations</h4>
<table class="table table-bordered table-striped table-condensed small">
<thead>
<tr>
<th>When</th>
<th>Who</th>
<th>Mail</th>
<th>Annotation</th>
</tr>
</thead>
<tbody>
{%endif%}
<tr>
<td>{{a.date}}</td>
<td style="white-space: nowrap">{{a.user_string}}</td>
<td style="white-space: nowrap">From {{a.mailauthor}}<br/>at <a href="https://www.postgresql.org/message-id/{{a.msgid}}">{{a.maildate}}</a></td>
<td width="99%">{{a.annotationtext}} <button type="button" class="close" title="Delete this annotation" onclick="deleteAnnotation({{a.id}})">×</button></td>
</tr>
{%if forloop.last%}
</body>
</table>
{%endif%}
{%endfor%}
{%if user.is_authenticated%}<button class="btn btn-xs btn-default" onclick="addAnnotation({{t.id}})">Add annotation</button>{%endif%}
</div>
</dd>
{%endfor%}
</dl>
</td>
</tr>
<tr>
<th>History</th>
<td>
<div style="max-height: 200px; overflow-y: scroll;">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>When</th>
<th>Who</th>
<th>What</th>
</tr>
</thead>
<tbody>
{%for h in patch.history %}
<tr>
<td style="white-space: nowrap;">{{h.date}}</td>
<td style="white-space: nowrap;">{{h.by_string}}</td>
<td width="99%">{{h.what}}</td>
</tr>
{%endfor%}
</tbody>
</table>
</div>
{%if user.is_authenticated%}
<a href="{{is_subscribed|yesno:"unsubscribe,subscribe"}}/" class="btn btn-default">{{is_subscribed|yesno:"Unsubscribe from patch update emails,Subscribe to patch update emails"}}</a>
{%endif%}
</td>
</tr>
</tbody>
</table>
{%include "patch_commands.inc"%}
{%comment%}commit dialog{%endcomment%}
<div class="modal fade" id="commitModal" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Flag as committed</h3>
</div>
<div class="modal-body">
<form class="form" style="margin-bottom: 5px;">
<div class="form-group">
<label for="committerlist">Committer</label>
<select id="committerSelect" class="form-control">
<option value="" style="display:none;"></option>
{%for c in committers%}
<option value="{{c.user.username}}">{{c.user.first_name}} {{c.user.last_name}}</option>
{%endfor%}
</select>
</div>
</form>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Close</a>
<a href="#" class="btn btn-default btn-primary" id="doCommitButton">Flag as committed</a>
</div>
</div>
</div>
</div>
{%include "thread_attach.inc"%}
{%comment%}Modal dialog for adding annotation{%endcomment%}
<div class="modal fade" id="annotateModal" role="dialog">
<div class="modal-dialog modal-lg"><div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Add annotation</h3>
</div>
<div id="annotateMessageBody" class="modal-body">
<div>Pick one of the messages in this thread</div>
<div id="annotateListWrap">
<select id="annotateMessageList" style="width:100%;" onChange="annotateMsgPicked()">
</select>
</div>
<div>Or copy/paste the message-id:</div>
<div id="annotateMsgidWrap">
<input id="annotateMsgId" type="text" style="width:100%" onKeyUp="annotateChanged()">
</div>
<div><br/></div>
<div>Enter a message for the annotation</div>
<div id="annotateTextWrap">
<input id="annotateMessage" type="text" style="width:100%" onKeyUp="annotateChanged()">
</div>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-default" data-dismiss="modal">Close</a>
<a href="#" id="doAnnotateMessageButton" class="btn btn-default btn-primary disabled">Add annotation</a>
</div>
</div></div>
</div>
{%endblock%}
{%block morescript%}
<script>
$(document).ready(function() {
$('button.close-nofloat').each(function(i,o) {
$(o).tooltip();
});
});
{%if attachnow%}
$(document).ready(function() {
attachThread({{cf.id}},{{patch.id}}, function() {
document.location.replace('/{{cf.id}}/{{patch.id}}/');
});
});
{%endif%}
</script>
{%endblock%}
|