| 1 | {include file='header' pageTitle='wcf.acp.exceptionLog'} |
| 2 | <script data-relocate="true"> |
| 3 | $(function() { |
| 4 | {if $exceptionID}window.location.hash = '{$exceptionID|encodeJS}';{/if} |
| 5 | |
| 6 | $('#exceptionID').on('keyup keydown keypress', function () { |
| 7 | if ($.trim($(this).val()) == '') { |
| 8 | $('#logFile').enable().parents('dl').removeClass('disabled'); |
| 9 | } |
| 10 | else { |
| 11 | $('#logFile').disable().parents('dl').addClass('disabled'); |
| 12 | } |
| 13 | }).trigger('keypress'); |
| 14 | |
| 15 | $('.jsCopyException').click(function () { |
| 16 | $(this).select(); |
| 17 | }); |
| 18 | }); |
| 19 | </script> |
| 20 | |
| 21 | <header class="contentHeader"> |
| 22 | <div class="contentHeaderTitle"> |
| 23 | <h1 class="contentTitle">{lang}wcf.acp.exceptionLog{/lang}</h1> |
| 24 | </div> |
| 25 | |
| 26 | {hascontent} |
| 27 | <nav class="contentHeaderNavigation"> |
| 28 | <ul> |
| 29 | {content}{event name='contentHeaderNavigation'}{/content} |
| 30 | </ul> |
| 31 | </nav> |
| 32 | {/hascontent} |
| 33 | </header> |
| 34 | |
| 35 | {include file='shared_formError'} |
| 36 | |
| 37 | {if !$logFiles|empty} |
| 38 | <form method="post" action="{link controller='ExceptionLogView'}{/link}"> |
| 39 | <section class="section"> |
| 40 | <h2 class="sectionTitle">{lang}wcf.acp.exceptionLog.search{/lang}</h2> |
| 41 | |
| 42 | <div class="row rowColGap formGrid"> |
| 43 | <dl class="col-xs-12 col-md-4"> |
| 44 | <dt></dt> |
| 45 | <dd> |
| 46 | <input type="text" id="exceptionID" name="exceptionID" value="{$exceptionID}" placeholder="{lang}wcf.acp.exceptionLog.search.exceptionID{/lang}" autofocus class="long"> |
| 47 | </dd> |
| 48 | </dl> |
| 49 | |
| 50 | <dl class="col-xs-12 col-md-4"> |
| 51 | <dt></dt> |
| 52 | <dd> |
| 53 | <select id="logFile" name="logFile"> |
| 54 | <option value="">{lang}wcf.acp.exceptionLog.search.logFile{/lang}</option> |
| 55 | {htmlOptions options=$logFiles selected=$logFile} |
| 56 | </select> |
| 57 | </dd> |
| 58 | </dl> |
| 59 | </div> |
| 60 | </section> |
| 61 | |
| 62 | <div class="formSubmit"> |
| 63 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s"> |
| 64 | </div> |
| 65 | </form> |
| 66 | {/if} |
| 67 | |
| 68 | {hascontent} |
| 69 | <div class="paginationTop"> |
| 70 | {content}{pages print=true assign=pagesLinks controller="ExceptionLogView" link="pageNo=%d&logFile=$logFile"}{/content} |
| 71 | </div> |
| 72 | {/hascontent} |
| 73 | |
| 74 | {if !$logFiles|empty} |
| 75 | {if $logFile} |
| 76 | {foreach from=$exceptions item='exception' key='exceptionKey'} |
| 77 | <details id="{$exceptionKey}" class="section exceptionContainer"{if $exception[collapsed]|empty} open{/if}> |
| 78 | <summary class="sectionTitle"> |
| 79 | {$exception[message]} |
| 80 | </summary> |
| 81 | |
| 82 | <div class="exceptionDetails"> |
| 83 | <dl> |
| 84 | <dt>{lang}wcf.acp.exceptionLog.exception.date{/lang}</dt> |
| 85 | <dd>{$exception[date]|plainTime}</dd> |
| 86 | </dl> |
| 87 | |
| 88 | <dl> |
| 89 | <dt>{lang}wcf.acp.exceptionLog.exception.requestURI{/lang}</dt> |
| 90 | <dd>{$exception[requestURI]}</dd> |
| 91 | </dl> |
| 92 | <dl> |
| 93 | <dt>{lang}wcf.acp.exceptionLog.exception.referrer{/lang}</dt> |
| 94 | <dd>{$exception[referrer]}</dd> |
| 95 | </dl> |
| 96 | <dl> |
| 97 | <dt>{lang}wcf.acp.exceptionLog.exception.userAgent{/lang}</dt> |
| 98 | <dd>{$exception[userAgent]}</dd> |
| 99 | </dl> |
| 100 | <dl> |
| 101 | <dt>{lang}wcf.acp.exceptionLog.exception.memory{/lang}</dt> |
| 102 | <dd>{$exception[peakMemory]|filesizeBinary} / {if $exception[maxMemory] == -1}∞{else}{$exception[maxMemory]|filesizeBinary}{/if}</dd> |
| 103 | </dl> |
| 104 | {foreach from=$exception[chain] item=chain} |
| 105 | <dl> |
| 106 | <dt>{lang}wcf.acp.exceptionLog.exception.message{/lang}</dt> |
| 107 | <dd>{$chain[message]}</dd> |
| 108 | </dl> |
| 109 | <dl> |
| 110 | <dt>{lang}wcf.acp.exceptionLog.exception.class{/lang}</dt> |
| 111 | <dd>{$chain[class]}</dd> |
| 112 | </dl> |
| 113 | <dl> |
| 114 | <dt>{lang}wcf.acp.exceptionLog.exception.file{/lang}</dt> |
| 115 | <dd>{$chain[file]} ({$chain[line]})</dd> |
| 116 | </dl> |
| 117 | {if !$chain[information]|empty} |
| 118 | {foreach from=$chain[information] item=extraInformation} |
| 119 | <dl> |
| 120 | <dt>{$extraInformation[0]}</dt> |
| 121 | <dd style="white-space: pre-wrap;">{$extraInformation[1]}</dd> |
| 122 | </dl> |
| 123 | {/foreach} |
| 124 | {/if} |
| 125 | <dl> |
| 126 | <dt>{lang}wcf.acp.exceptionLog.exception.stacktrace{/lang}</dt> |
| 127 | <dd> |
| 128 | <ol start="0" class="nativeList"> |
| 129 | {foreach from=$chain[stack] item=stack} |
| 130 | <li>{$stack[file]} ({$stack[line]}): {$stack[class]}{$stack[type]}{$stack[function]}(…)</li> |
| 131 | {/foreach} |
| 132 | </ol> |
| 133 | </dd> |
| 134 | </dl> |
| 135 | {/foreach} |
| 136 | <dl> |
| 137 | <dt><label for="copyException{$exceptionKey}">{lang}wcf.acp.exceptionLog.exception.copy{/lang}</label></dt> |
| 138 | <dd><textarea id="copyException{$exceptionKey}" rows="5" cols="40" class="jsCopyException" readonly>{$exception[0]}</textarea></dd> |
| 139 | </dl> |
| 140 | </div> |
| 141 | </details> |
| 142 | {/foreach} |
| 143 | |
| 144 | <footer class="contentFooter"> |
| 145 | {hascontent} |
| 146 | <div class="paginationBottom"> |
| 147 | {content}{@$pagesLinks}{/content} |
| 148 | </div> |
| 149 | {/hascontent} |
| 150 | </footer> |
| 151 | {elseif $exceptionID} |
| 152 | <woltlab-core-notice type="error">{lang}wcf.acp.exceptionLog.exceptionNotFound{/lang}</woltlab-core-notice> |
| 153 | {/if} |
| 154 | {else} |
| 155 | <woltlab-core-notice type="info">{lang}wcf.global.noItems{/lang}</woltlab-core-notice> |
| 156 | {/if} |
| 157 | |
| 158 | {include file='footer'} |