-
Notifications
You must be signed in to change notification settings - Fork 156
/
jerror.html
323 lines (292 loc) · 10.3 KB
/
jerror.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
{# Copyright (C) 2006-2014 Edgewall Software
This software is licensed as described in the file COPYING, which
you should have received as part of this distribution. The terms
are also available at http://trac.edgewall.com/license.html.
This software consists of voluntary contributions made by many
individuals. For the exact contribution history, see the revision
history and logs, available at http://trac.edgewall.org/.
#}
# extends "jlayout.html"
<!DOCTYPE html>
<html>
<head>
<title>
# block title
${title or _('Error')}
${ super() }
# endblock title
</title>
# block head
${ super() }
# if frames:
<script type="text/javascript">/*<![CDATA[*/
jQuery(document).ready(function($) {
$("#traceback a").click(function() {
$("div", this.parentNode).slideToggle("fast");
return false;
});
$("#plugins td.file a").click(function() {
var idx = parseInt($(this).attr("href").substring(6));
$("#traceback li").eq(idx).children("div").slideDown("fast");
return true;
});
$("#tbtoggle").click(function() {
if (this.value.indexOf("interactive") < 0) {
this.value = j_("Switch to interactive view");
$("#traceback ul").fadeOut("fast", function() {
$("#traceback pre").fadeIn("fast");
});
} else {
this.value = j_("Switch to plain text view");
$("#traceback pre").fadeOut("fast", function() {
$("#traceback ul").fadeIn("fast");
});
}
return false;
});
/* Only activate interactive view if Javascript is enabled */
$("#traceback ul").show();
$("#traceback pre").hide();
$("#tbtoggle").parent().show();
});
/*]]>*/</script>
# endif
<script type="text/javascript">/*<![CDATA[*/
jQuery(document).ready(function($) {
$("form.newticket textarea").each(function() {
$(this).val($(this).val()
.replace(/#USER_AGENT#/m, navigator.userAgent)
.replace(/#JQUERY#/m, $().jquery)
.replace(/#JQUERYUI#/m, $.ui.version)
.replace(/#JQUERYTP#/m, $.timepicker.version));
});
});
/*]]>*/</script>
# endblock head
</head>
<body>
<div>
# macro create_ticket(url=none)
<input type="hidden" name="reporter" value="${get_reporter_id(req)}" />
# if url == trac.homepage.strip('/'):
<input type="hidden" name="version"
value="${trac.version.split('-', 1)[0] if 'dev' in trac.version
else trac.version}" />
# endif
# for arg, value in tracker_args.iteritems():
<input type="hidden" name="${arg}" value="${value}" />
# endfor
<input type="hidden" name="summary" value="${message}" />
<textarea name="description" rows="3" cols="10">
${description_en if url else description}</textarea>
<span class="inlinebuttons">
<input type="submit" name="create" value="${_('Create')}" />
</span>
# endmacro
</div>
# block content
<div id="content" class="error">
# if type == 'TracError':
<h1>${title}</h1>
# if not find_element(message, tag='p'):
<p class="message">${message}</p>
# else:
${message}
# endif
# elif type == 'internal':
<h1>${_("Oops…")}</h1>
<div class="message">
<strong>${_("Trac detected an internal error:")}</strong>
<pre>${message}</pre>
</div>
# if trac_error_rendering is undefined and 'TRAC_ADMIN' not in perm:
<p>
# set trac_admin = _("Trac administrator")
# set project_admin
# if project.admin:
<a href="mailto:${project.admin}">${trac_admin}</a>
# else:
${trac_admin}
# endif
# endset
# trans project_admin = project_admin
There was an internal error in Trac. It is recommended that
you notify your local ${project_admin} with the information
needed to reproduce the issue.
# endtrans
</p>
# if project.admin_href:
<form class="newticket" method="get"
action="${project.admin_href.newticket()}#">
<p>
# trans create_a_ticket = create_ticket()
To that end, you could ${create_a_ticket} a ticket.
# endtrans
</p>
</form>
# endif
<p>${_("The action that triggered the error was:")}</p>
<pre>${req.method}: ${req.path_info}</pre>
# else:
# if not project.admin_href or project.admin_trac_url == '.':
<p>
${_("This is probably a local installation issue.")}
</p>
# else:
<form class="newticket" method="get"
action="${project.admin_href.newticket()}#">
<p>
# trans create_a_ticket = create_ticket()
This is probably a local installation issue. You should
${create_a_ticket} a ticket at the admin Trac to report the
issue.
# endtrans
</p>
</form>
# endif
<h2>${_("Found a bug in Trac?")}</h2>
<p>
# trans
If you think this should work and you can reproduce the
problem, you should consider creating a bug report.
# endtrans
</p>
# if faulty_plugins:
<p>
# if len(faulty_plugins) == 1:
# trans name = faulty_plugins[0].name
Note that the ${name} plugin seems to be involved.
# endtrans
# else:
# trans
Note that the following plugins seem to be involved:
# endtrans
${faulty_plugins|map('name')|join(', ')}
# endif
<strong>
${_("Please report this issue to the plugin maintainer.")}
</strong>
</p>
# endif
# with q = quote_plus(message[:80])
<p>
# set search_href = tracker + "/search?ticket=yes&noquickjump=1&q=" + q
# trans search_href, trac_ml = trac.homepage + 'wiki/MailingList'
Before you do that, though, please first try
<strong><a href="${search_href}">searching</a> for similar
issues</strong>, as it is quite likely that this problem has
been reported before. For questions about installation and
configuration of Trac or its plugins, please try the
<a href="${trac_ml}">mailing list</a> instead of creating a
ticket.
# endtrans
</p>
# endwith
<form class="newticket" method="get" action="${tracker}/newticket">
<p>
# trans create = create_ticket(tracker)
Otherwise, please ${create} a new bug report describing the
problem and explain how to reproduce it.
# endtrans
</p>
</form>
# if traceback:
<h2>${_("Python Traceback")}</h2>
<div id="traceback">
${_("Most recent call last:")}
# if frames:
<ul style="display: none">
# for frame in frames:
<li class="frame">
<a href="#frame${loop.index0}" id="frame${loop.index0}">
# set file = frame.filename
# set line = frame.lineno + 1
# set function = frame.function
# trans file, line, function
<span class="file">File "${file}", line <strong>${line}</strong>,
in</span>
<var>${function}</var>
# endtrans
</a>
# if frame.line:
<div class="source" style="display: none">
<h3>${_("Code fragment:")}</h3>
<table class="code">
<thead><tr>
<th class="lineno">${_("Line")}</th>
<th class="content"></th></tr></thead>
<tbody>
# for line in (frame.lines_before + [frame.line] + frame.lines_after):
<tr ${{'class': 'current'
if loop.index0 == len(frame.lines_before)
}|htmlattr}>
<th>
${frame.lineno + loop.index - len(frame.lines_before)}
</th>
<td>${line or ' '|safe}</td>
</tr>
# endfor
</tbody>
</table>
</div>
# endif
# if frame.vars:
<div class="vars" style="display: none">
<h3>${_("Local variables:")}</h3>
<table class="listing">
<thead><tr>
<th>${_("Name")}</th>
<th>${_("Value")}</th></tr></thead>
<tbody>
# for name, value in sorted(frame.vars.items()):
<tr ${{'class': loop.cycle('odd', none)}|htmlattr}>
<th scope="row"><var>${name}</var></th>
<td><code>${shorten_line(repr(value))}</code></td>
</tr>
# endfor
</tbody>
</table>
</div>
# endif
</li>
# endfor
</ul>
# endif
<pre>
# for frame in frames:
# set file = frame.filename
# set line = frame.lineno + 1
# set function = frame.function
# trans file, line, function
File "${file}", line ${line}, in ${function}
# endtrans
# if frame.line:
${'\n ' + frame.line.lstrip()}
# endif
# endfor
# if not frames:
${traceback}
# endif
</pre>
<p style="display: none">
<input type="button" id="tbtoggle"
value="${_('Switch to plain text view')}"/>
</p>
</div>
# endif
# with system_info = env.system_info
# include "jenvironment_info.html"
# endwith
# endif
# endif
<p>
# trans href_guide = href.wiki('TracGuide')
<a href="${href_guide}">TracGuide</a> — The Trac User
and Administration Guide
# endtrans
</p>
</div>
${ super() }
# endblock content
</body>
</html>