Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dr. Frank Hoffmann
authored and
Michael Howitz
committed
Aug 17, 2018
1 parent
747eae6
commit 62dcc8f
Showing
2 changed files
with
164 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,93 @@ | ||
<h1 tal:replace="structure context/manage_page_header">Header</h1> | ||
<h1 tal:replace="structure context/manage_tabs">Tabs</h1> | ||
|
||
<p class="form-help"> | ||
This page lists the exceptions that have occurred in this site | ||
recently. You can configure how many exceptions should be kept | ||
and whether the exceptions should be copied to Zope's event log | ||
file(s). | ||
</p> | ||
<main class="container-fluid"> | ||
<p class="form-help mb-4"> | ||
This page lists the exceptions that have occurred in this site | ||
recently. You can configure how many exceptions should be kept | ||
and whether the exceptions should be copied to Zope's event log | ||
file(s). | ||
</p> | ||
|
||
<form action="setProperties" method="post"> | ||
<table tal:define="props container/getProperties"> | ||
<tr> | ||
<td align="left" valign="top"> | ||
<div class="form-label"> | ||
Number of exceptions to keep | ||
</div> | ||
</td> | ||
<td align="left" valign="top"> | ||
<input type="text" name="keep_entries" size="40" | ||
tal:attributes="value props/keep_entries" /> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="left" valign="top"> | ||
<div class="form-label"> | ||
Copy exceptions to the event log | ||
</div> | ||
</td> | ||
<td align="left" valign="top"> | ||
<input type="checkbox" name="copy_to_zlog" | ||
tal:attributes="checked props/copy_to_zlog; | ||
disabled not:container/checkEventLogPermission|nothing" /> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="left" valign="top"> | ||
<div class="form-label"> | ||
Ignored exception types | ||
</div> | ||
</td> | ||
<td align="left" valign="top"> | ||
<textarea name="ignored_exceptions:lines" cols="40" rows="3" | ||
tal:content="python: '\n'.join(props['ignored_exceptions'])"></textarea> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="left" valign="top"> | ||
</td> | ||
<td align="left" valign="top"> | ||
<div class="form-element"> | ||
<input class="form-element" type="submit" name="submit" | ||
value=" Save Changes " /> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
<form action="setProperties" method="post" | ||
tal:define="props container/getProperties"> | ||
|
||
<h3>Exception Log (most recent first)</h3> | ||
<div class="form-group row"> | ||
<label for="id" class="form-label col-sm-5 col-md-4">Number of exceptions to keep</label> | ||
<div class=" col-sm-7 col-md-8"> | ||
<input type="text" class="form-control" name="keep_entries" | ||
tal:attributes="value props/keep_entries" /> | ||
</div> | ||
</div> | ||
|
||
<div tal:define="entries container/getLogEntries"> | ||
<div class="form-group row"> | ||
<label for="id" class="form-label col-sm-5 col-md-4">Copy exceptions to the event log</label> | ||
<div class=" col-sm-7 col-md-8"> | ||
<input type="checkbox" | ||
class="checkbox-list-item" | ||
name="copy_to_zlog" | ||
tal:attributes="checked props/copy_to_zlog; | ||
disabled not:container/checkEventLogPermission|nothing" /> | ||
</div> | ||
</div> | ||
|
||
<em tal:condition="not:entries"> | ||
No exceptions logged. | ||
</em> | ||
<div class="form-group row"> | ||
<label for="id" class="form-label col-sm-5 col-md-4">Number of exceptions to keep</label> | ||
<div class=" col-sm-7 col-md-8"> | ||
<textarea name="ignored_exceptions:lines" class="form-control" rows="3" | ||
tal:content="python: '\n'.join(props['ignored_exceptions'])"></textarea> | ||
</div> | ||
</div> | ||
|
||
<table tal:condition="entries"> | ||
<tr> | ||
<th align="left">Time</th> | ||
<th align="left">Username (User Id)</th> | ||
<th align="left">Exception</th> | ||
<th></th> | ||
</tr> | ||
<tr tal:repeat="entry entries"> | ||
<td valign="top" nowrap="nowrap"> | ||
<span tal:content="python: modules['DateTime'].DateTime(entry['time']).Time()">13:04:41</span> | ||
</td> | ||
<td> | ||
<span tal:content="string: ${entry/username} (${entry/userid})"> | ||
joe (joe) | ||
</span> | ||
</td> | ||
<td valign="top"> | ||
<a href="showEntry" tal:attributes="href string:showEntry?id=${entry/id}" | ||
> | ||
<span tal:content="entry/type">AttributeError</span>: | ||
<span tal:define="value entry/value" | ||
tal:content="python: len(value) < 70 and value or value[:70] + '...'"> | ||
Application object has no attribute "zzope"</span> | ||
</a> | ||
</td> | ||
<td><a href="#" | ||
tal:attributes="href string:${context/absolute_url}/forgetEntry?id=${entry/id}" | ||
>Forget this entry</a></td> | ||
</tr> | ||
</table> | ||
|
||
</div> | ||
<div class="zmi-controls"> | ||
<input class="btn btn-primary" type="submit" name="submit" value="Save Changes" /> | ||
</div> | ||
|
||
</form> | ||
</form> | ||
|
||
<p> | ||
<form action="manage_main" method="GET"> | ||
<input type="submit" name="submit" value=" Refresh " /> | ||
</form> | ||
</p> | ||
|
||
<h3>Exception Log (most recent first)</h3> | ||
<div tal:define="entries container/getLogEntries"> | ||
|
||
<div class="alert alert-info" tal:condition="not:entries">No exceptions logged.</div> | ||
|
||
<table class="table table-sm zmi-errorlog-entries" style="font-size:smaller" tal:condition="entries"> | ||
<thead> | ||
<tr> | ||
<th class="zmi-time">Time</th> | ||
<th class="zmi-username" title="User Id">Username</th> | ||
<th class="zmi-exception">Exception</th> | ||
<th class="blank"> </th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr tal:repeat="entry entries"> | ||
<td class="zmi-time" style="white-space:nowrap"> | ||
<span tal:replace="python: modules['DateTime'].DateTime(entry['time']).Time()">13:04:41</span> | ||
</td> | ||
<td class="zmi-username"> | ||
<span tal:replace="string: ${entry/username} (${entry/userid})">joe (joe)</span> | ||
</td> | ||
<td class="zmi-exception"> | ||
<a href="showEntry" tal:attributes="href string:showEntry?id=${entry/id}"> | ||
<span tal:replace="entry/type">AttributeError</span>: | ||
<span tal:define="value entry/value" | ||
tal:content="python: len(value) < 70 and value or value[:70] + '...'" | ||
>Application object has no attribute "zzope"</span> | ||
</a> | ||
</td> | ||
<td><a href="#" tal:attributes="href string:${context/absolute_url}/forgetEntry?id=${entry/id}" | ||
>Forget this entry</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<form action="manage_main" method="GET"> | ||
<div class="zmi-controls"> | ||
<input class="btn btn-primary" type="submit" name="submit" value="Refresh" /> | ||
</div> | ||
</form> | ||
|
||
<h1 tal:replace="structure context/manage_page_footer">Footer</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,90 @@ | ||
<h1 tal:replace="structure here/manage_page_header">Header</h1> | ||
<h1 tal:replace="structure here/manage_tabs">Tabs</h1> | ||
|
||
<h3>Exception traceback</h3> | ||
|
||
<p> | ||
<form action="manage_main" method="GET"> | ||
<input type="submit" name="submit" value=" Return to log " /> | ||
</form> | ||
</p> | ||
|
||
<div tal:define="entry python:container.getLogEntryById(request.get('id'))"> | ||
|
||
<em tal:condition="not:entry"> | ||
The specified log entry was not found. It may have expired. | ||
</em> | ||
|
||
<div tal:condition="entry"> | ||
|
||
<table> | ||
<tr> | ||
<th align="left" valign="top">Time</th> | ||
<td tal:content="python: modules['DateTime'].DateTime(entry['time'])"></td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">User Name (User Id)</th> | ||
<td tal:content="string: ${entry/username} (${entry/userid})">joe (joe)</td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">Request URL</th> | ||
<td tal:content="entry/url">http://example.com</td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">Exception Type</th> | ||
<td tal:content="entry/type">AttributeError</td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">Exception Value</th> | ||
<td tal:content="entry/value">zzope</td> | ||
</tr> | ||
</table> | ||
|
||
<div tal:condition="entry/tb_html" tal:content="structure entry/tb_html"> | ||
Traceback (HTML) | ||
</div> | ||
<pre tal:condition="not:entry/tb_html" tal:content="entry/tb_text"> | ||
Traceback (text) | ||
</pre> | ||
|
||
<p tal:condition="entry/tb_text"><a href="" tal:attributes="href | ||
string:getLogEntryAsText?id=${entry/id}">Display | ||
traceback as text</a></p> | ||
|
||
<div tal:condition="entry/req_html"> | ||
|
||
<p> | ||
<form action="manage_main" method="GET"> | ||
<input type="submit" name="submit" value=" Return to log " /> | ||
</form> | ||
</p> | ||
|
||
<h3>REQUEST</h3> | ||
<div tal:replace="structure entry/req_html"></div> | ||
</div> | ||
|
||
</div> | ||
|
||
<p> | ||
<form action="manage_main" method="GET"> | ||
<input type="submit" name="submit" value=" Return to log " /> | ||
</form> | ||
</p> | ||
|
||
</div> | ||
|
||
|
||
<main class="container-fluid"> | ||
<h3>Exception traceback</h3> | ||
|
||
<a class="btn btn-primary mt-4 mb-4" href="manage_main"> | ||
<i class="fas fa-chevron-left"></i> | ||
Return to log | ||
</a> | ||
|
||
<div tal:define="entry python:container.getLogEntryById(request.get('id'))"> | ||
|
||
<div class="alert alert-info" tal:condition="not:entry"> | ||
The specified log entry was not found. It may have expired. | ||
</div> | ||
|
||
|
||
<div tal:condition="entry"> | ||
|
||
<table class="table table-sm zmi-errorlog-entry"> | ||
<tr> | ||
<th align="left" valign="top">Time</th> | ||
<td tal:content="python: modules['DateTime'].DateTime(entry['time'])"></td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">User Name (User Id)</th> | ||
<td tal:content="string: ${entry/username} (${entry/userid})">joe (joe)</td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">Request URL</th> | ||
<td tal:content="entry/url">http://example.com</td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">Exception Type</th> | ||
<td tal:content="entry/type">AttributeError</td> | ||
</tr> | ||
<tr> | ||
<th align="left" valign="top">Exception Value</th> | ||
<td tal:content="entry/value">zzope</td> | ||
</tr> | ||
</table> | ||
|
||
<div class="code zmi-traceback" tal:condition="entry/tb_html" | ||
tal:content="structure entry/tb_html"> | ||
Traceback (HTML) | ||
</div> | ||
|
||
<pre class="code zmi-traceback" tal:condition="not:entry/tb_html" | ||
tal:content="entry/tb_text"> | ||
Traceback (text) | ||
</pre> | ||
|
||
<tal:block tal:condition="entry/tb_text"> | ||
<a class="btn btn-primary" href="" tal:attributes="href string:getLogEntryAsText?id=${entry/id}"> | ||
Display traceback as text | ||
</a> | ||
</tal:block> | ||
|
||
<div tal:condition="entry/req_html"> | ||
|
||
<div class="alert alert-info" tal:condition="not:entry"> | ||
The specified log entry was not found. It may have expired. | ||
</div> | ||
|
||
<hr class="mt-4 mb-4" /> | ||
|
||
<h2>REQUEST</h2> | ||
<div class="zmi-request-object" | ||
tal:content="structure entry/req_html"> | ||
Details of Request-Object | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
<a class="btn btn-primary mt-4 mb-4" href="manage_main"> | ||
<i class="fas fa-chevron-left"></i> | ||
Return to log | ||
</a> | ||
|
||
</div> | ||
|
||
</main> | ||
|
||
<h1 tal:replace="structure here/manage_page_footer">Footer</h1> | ||
|