forked from fedora-infra/bodhi
/
new_update.html
352 lines (326 loc) · 15.5 KB
/
new_update.html
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<%inherit file="master.html"/>
<div class="container">
<div id='js-warning' class="col-md-10 col-md-offset-1 m-t-3">
<div class="alert alert-warning">
<h3>
% if not update:
Creating a new update requires JavaScript
% else:
Editing an update requires JavaScript
% endif
</h3>
<p>If you have JavaScript disabled with a plugin like NoScript, please
disable that plugin and reload the page. If you trust Fedora
Infrastructure, you might find it convenient to enable JavaScript just
for the domain <code>fedoraproject.org</code>.</p>
<p>If you are opposed to JavaScript in principle, you're not left out!
Please use the fully-featured <a href="#">Bodhi command-line
interface tool</a>.</p>
</div>
</div>
<div id="new-update-form" class="p-t-3" style="display:none;">
<div class="row">
<div class="col-md-12">
% if not update:
<h2 class="pull-left">New Update</span>
% else:
<h2 class="pull-left">Edit
${update.alias}
</h2>
% endif
</div>
</div>
<div class="row">
<div class="col-md-5">
<div class="card card-form">
<div class="card-header clearfix">
<span class="pull-left" data-placement="bottom" data-toggle="tooltip" title="This is a helper field, here only to pre-populate the builds and the bugs lists with relevant options. You can leave it empty if you like.">
Packages</span>
</div>
<div class="card-block p-a-0">
<form id="search" role="search">
<div id="packages-search" class="form-group noui m-b-0">
<input class="typeahead form-control noui" name="term" type="text"
placeholder="Add a package">
</div>
</form>
</div>
</div>
<div class="card card-form">
<div class="card-header clearfix">
<span class="pull-left" data-placement="bottom" data-toggle="tooltip" title="Here you can add a list of candidate builds that you want to be included in this update. This is required. (What is an update without a list of builds anyways... it doesn't make any sense.)">
Candidate Builds</span>
</div>
<div class="card-block p-a-0">
<div id="builds-adder" class="input-group">
<input class="form-control noui" type="text"
placeholder="Add a build, like package-0.2.1-5.fc26">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="fa fa-plus" data-glyph="plus"></span>
</button>
</span>
</div>
<input name="builds" type="hidden"/>
<div id="candidate-checkboxes">
% if update:
% for build in update.builds:
<div class="checkbox"><label>
<input name="builds" data-build-nvr="${build.nvr}"
type="checkbox" value="${build.nvr}" checked> ${build.nvr}
</label></div>
% endfor
% endif
</div>
</div>
</div>
</div>
<div class="col-md-7">
<div class="card card-form">
<div class="card-header clearfix">
<span class="pull-left" data-placement="bottom" data-toggle="tooltip" title="Update name to display. You can leave it empty if you like.">
Update name</span>
</div>
<div class="card-block p-a-0">
<form id="search" role="search">
<input class="typeahead form-control noui" name="display_name" type="text"
placeholder="Update name"
% if update:
value=${update.display_name}
% endif
>
</form>
</div>
</div>
<div class="card card-form">
<div class="card-header clearfix">
<span class="pull-left" data-placement="bottom" data-toggle="tooltip" title="Here you can add a list of bugzilla bug IDs that you want to be associated with this update. Associated bugs will prompt testers to test them. You can furthermore mark bug feedback as required in the 'details' panel at the bottom of this form.">
Related Bugs</span>
</div>
<div class="card-block p-a-0">
<div id="bugs-adder" class="input-group">
<input class="form-control noui" type="text"
placeholder="Add #RHBZ">
<span class="input-group-btn">
<button class="btn btn-default" type="button">
<span class="fa fa-plus" data-glyph="plus"></span>
</button>
</span>
</div>
<input name="bugs" type="hidden"/>
<div id="bugs-checkboxes">
% if update:
% for bug in update.bugs:
<div class="checkbox">
<label>
<input name="bugs" type="checkbox" value="${bug.bug_id}" checked>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=${bug.bug_id}">
#${bug.bug_id}</a> ${bug.title}
</label>
</div>
% endfor
% endif
</div>
</div>
</div>
</div>
</div> <!-- end row -->
<div class="row">
<div class="col-md-6">
<div class="card card-form m-b-0">
<div class="card-header clearfix">
<span class="pull-left" data-toggle="tooltip" title="Tell people what's new and give them a heads up about what to test. Any gotchas? Where's the changelog?">
Update notes</span>
</div>
<div class="card-block p-a-0">
<textarea class="form-control" id="notes" name="notes" rows="6"
placeholder="Update notes go here. Please be as descriptive as possible. Help testers know what to test, and users know why this update is available and what major changes it brings (if any)." required="true">
% if update:
${update.notes}
% endif
</textarea>
</div>
</div>
<p class="text-xs-right m-b-1"><small>Update notes support <a href="#" data-toggle="modal" data-target="#markdown-help">Fedora-Flavored Markdown</a>.</small></p>
</div>
${self.fragments.markdown_help_modal()}
<div class="col-md-6">
<div class="card card-form">
<div class="card-header clearfix">
<span class="pull-left" data-toggle="tooltip" title="Perhaps unsurprisingly, this is a preview of how your update notes will be rendered.">
Preview</span>
</div>
<div class="card-block p-a-0">
<div id="preview"><h3><small>Preview</small></h3></div>
</div>
</div>
</div>
</div> <!-- end row -->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header clearfix">
<span class="pull-left">Final details</span>
</div>
<div class="card-block">
<div class="row">
<div class="col-md-7">
<fieldset class="form-group radio-group">
<div data-toggle="tooltip" title="What kind of update is this?"><strong>Type</strong></div>
% for value in types:
<label class="c-input c-radio">
<input type="radio" name="type" value="${value}"
% if update and update.type.value == value:
checked="checked"
% endif
> ${value}
<span class="c-indicator"></span>
</label>
% endfor
</fieldset>
<fieldset class="form-group radio-group">
<div data-toggle="tooltip" title="How important is this update, really?"><strong>Severity</strong></div>
% for value in severities:
<label class="c-input c-radio">
<input type="radio" name="severity" value="${value}"
% if update and update.severity.value == value:
checked="checked"
% endif
% if update and update.type.value == 'security' and value == 'unspecified':
disabled="disabled"
% endif
> ${value}
<span class="c-indicator"></span>
</label>
% endfor
</fieldset>
<fieldset class="form-group radio-group">
<div data-toggle="tooltip" title="What action should testers take after installing the update? Do they need to update or reboot to see if things are really working?">
<strong>Suggestion</strong>
</div>
% for value in suggestions:
<label class="c-input c-radio">
<input type="radio" name="suggest" value="${value}"
% if update and update.suggest.value == value:
checked="checked"
% endif
> ${value}
<span class="c-indicator"></span>
</label>
% endfor
</fieldset>
<dl>
<dt data-toggle="tooltip" title="If checked, then associated bugs in RHBZ will be closed once this update is pushed to the stable repository.">
Close bugs on stable?</dt>
<dd> <input type="checkbox" name="close_bugs" data-singleton="true"
% if update and update.close_bugs:
checked
% elif not update:
checked
% endif
></dd>
<dt data-toggle="tooltip" title="If checked, this option allows bodhi to automatically move your update from testing to stable once enough positive karma has been given.">
Auto-request stable based on karma ?</dt>
<dd> <input type="checkbox" name="autokarma" data-singleton="true"
% if update and update.autokarma:
checked
% elif not update:
checked
% endif>
</dd>
<dt data-toggle="tooltip" title="If checked, this option allows bodhi to automatically move your update from testing to stable once enough time was spent in testing.">
Auto-request stable based on time ?</dt>
<dd> <input type="checkbox" name="autotime" data-singleton="true"
% if update and update.autotime:
checked
% elif not update:
checked
% endif>
</dd>
</dl>
</div>
<div class="col-md-5">
<dl>
<dt data-toggle="tooltip" title="This is the threshold of positive karma required to automatically push an update from testing to stable.">
Stable karma</dt>
<dd> <input type="number" name="stable_karma" min="1" required
% if update:
value="${update.stable_karma}"
% elif not update:
value="3"
% endif
></dd>
<dt data-toggle="tooltip" title="This is the threshold of negative karma required to automatically unpush an update from testing.">
Unstable karma</dt>
<dd> <input type="number" name="unstable_karma" max="-1" required
% if update:
value="${update.unstable_karma}"
% elif not update:
value="-3"
% endif
></dd>
<dt data-toggle="tooltip" title="This is the number of days an update needs to spend in testing to be automatically pushed to stable.">
Stable days</dt>
<dd> <input type="number" name="stable_days" min="1"
% if update:
value="${update.stable_days}"
% elif not update:
value=""
% endif
></dd>
<dt data-toggle="tooltip" title="If checked, this will require that positive feedback be given on all associated bugs before the update can pass to stable. If your update has no associated bugs, this option has no effect.">
Require bugs
</dt>
<dd> <input type="checkbox" name="require_bugs" data-singleton="true"
% if update and update.require_bugs:
checked
% elif not update:
checked
% endif
></dd>
<dt data-toggle="tooltip" title="If checked, this will require that positive feedback be given on all associated wiki test cases before the update can pass to stable. If your update has no associated wiki test cases, this option has no effect.">
Require testcases</dt>
<dd> <input type="checkbox" name="require_testcases" data-singleton="true"
% if update and update.require_testcases:
checked
% elif not update:
checked
% endif
></dd>
<dt data-toggle="tooltip" title="If specified, the update will be blocked from stable until all of the listed taskotron tests are passing.">
Required checks <a target="_blank" href="https://fedoraproject.org/wiki/Taskotron/Tasks"><span class="glyphicon glyphicon-question-sign"></span></a></dt>
<dd> <input type="text" name="requirements"
placeholder="Required taskotron tasks"
% if update and update.requirements:
value="${update.requirements}"
% endif
></dd>
</dl>
</div>
</div>
<input type="hidden" name="csrf_token" value="${request.session.get_csrf_token()}"/>
% if update:
<input type="hidden" name="edited" value="${update.alias}">
% endif
<button id="submit" class="btn btn-success">
% if update:
<span class="indicator fa fa-edit" data-spinclass="indicator fa fa-spinner fa-spin"></span>
Save
% else:
<span class="indicator fa fa-save" data-spinclass="indicator fa fa-spinner fa-spin"></span>
Submit
% endif
</button>
</div>
</div>
</div>
</div> <!-- end row -->
</div>
</div>
<script src="${request.static_url('bodhi:server/static/js/update_form.js')}"></script>
<script>$("#js-warning").hide();$("#new-update-form").show();</script>
<script> $(document).ready(function() { $('.panel-heading > span, dt').tooltip(); }); </script>
% if not update:
<!-- Pre-select the radio buttons -->
<script> $(document).ready(function() { $(".radio-group > label:first-of-type input").attr('checked', 'checked')}); </script>
% endif