[FEATURE] Add SQL Logging to AdminPanel
[Packages/TYPO3.CMS.git] / typo3 / sysext / adminpanel / Resources / Private / Templates / Modules / Debug / QueryInformation.html
1 <html xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
2 <div class="typo3-adminPanel-sql">
3 <div class="typo3-adminPanel-row typo3-adminPanel-row-nowrap typo3-adminPanel-sql-header">
4 <div class="typo3-adminPanel-col typo3-adminPanel-col-icon"></div>
5 <div class="typo3-adminPanel-col typo3-adminPanel-col-ellipsis typo3-adminPanel-col-auto">
6 <f:translate key="LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:submodule.queryInformation.sqlQuery"/>
7 </div>
8 <div class="typo3-adminPanel-col typo3-adminPanel-sql-col-count">
9 <f:translate key="LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:submodule.queryInformation.queryCount"/>
10 </div>
11 <div class="typo3-adminPanel-col typo3-adminPanel-sql-col-time">
12 <f:translate key="LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:submodule.queryInformation.queryTime"/>
13 </div>
14 </div>
15 <f:for each="{queries}" as="queryCollection" iteration="queryCollectionIteration">
16 <div class="typo3-adminPanel-row typo3-adminPanel-row-nowrap">
17 <div class="typo3-adminPanel-col typo3-adminPanel-col-icon">
18 <a href="#" title="{f:translate(key:'LLL:EXT:adminpanel/Resources/Private/Language/locallang.xlf:button.view')}" data-typo3-zoom-target="queryCollection-{queryCollectionIteration.index}">
19 <core:icon identifier="actions-document-view" alternativeMarkupIdentifier="inline"/>
20 </a>
21 </div>
22 <div class="typo3-adminPanel-col typo3-adminPanel-col-ellipsis typo3-adminPanel-col-auto">
23 {queryCollection.sql}
24 </div>
25 <div class="typo3-adminPanel-col typo3-adminPanel-sql-col-count">{queryCollection.count}</div>
26 <div class="typo3-adminPanel-col typo3-adminPanel-sql-col-time">
27 <div class="typo3-adminPanel-progress">
28 <div class="typo3-adminPanel-progress-bar" style="width:{queryCollection.time / totalTime * 100}%;"></div>
29 <div class="typo3-adminPanel-progress-value"><f:format.number decimals="2">{queryCollection.time}</f:format.number></div>
30 </div>
31 </div>
32 </div>
33 <div class="typo3-adminPanel-zoom" data-typo3-zoom-id="queryCollection-{queryCollectionIteration.index}">
34 <div class="typo3-adminPanel-zoom-header">
35 <button class="typo3-adminPanel-btn" data-typo3-zoom-close="true">
36 {f:translate(key:'LLL:EXT:adminpanel/Resources/Private/Language/locallang.xlf:button.close')}
37 </button>
38 </div>
39 <div class="typo3-adminPanel-zoom-body">
40 <h3 class="typo3-adminPanel-headline">{f:translate(key:'LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:submodule.queryInformation.query')}</h3>
41 <pre class="typo3-adminPanel-sql-statement">{queryCollection.sql}</pre>
42 <f:if condition="{queryCollection.queries}">
43 <f:if condition="{queryCollection.queries.0.backtrace}">
44 <f:alias map="{query: queryCollection.queries.0}">
45 <h3 class="typo3-adminPanel-headline">{f:translate(key:'LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:submodule.queryInformation.backtrace')}</h3>
46 <div class="typo3-adminPanel-sql-backtrace">
47 <f:for each="{query.backtrace}" as="value">
48 <div class="typo3-adminPanel-sql-backtrace-item">
49 <span class="typo3-adminPanel-sql-backtrace-item-function">
50 {value.class}{value.type}{value.function}
51 </span>
52 <span class="typo3-adminPanel-sql-backtrace-item-file">
53 {value.file}:{value.line}
54 </span>
55 </div>
56 </f:for>
57 </div>
58 </f:alias>
59 </f:if>
60 <h3 class="typo3-adminPanel-headline">{f:translate(key:'LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:submodule.queryInformation.queries')}</h3>
61 <div class="typo3-adminPanel-table-overflow">
62 <table class="typo3-adminPanel-table typo3-adminPanel-table-debug">
63 <thead>
64 <tr>
65 <f:for each="{queryCollection.queries.0.params}" as="value" iteration="param">
66 <th scope="col">dcValue{param.cycle}</th>
67 </f:for>
68 <th scope="col" class="typo3-adminPanel-table-cell-space"></th>
69 <th scope="col" class="typo3-adminPanel-table-cell-time"><f:translate key="LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:submodule.queryInformation.queryTime"/></th>
70 </tr>
71 </thead>
72 <tbody>
73 <f:for each="{queryCollection.queries}" as="query" iteration="iterator">
74 <tr>
75 <f:for each="{query.params}" as="value">
76 <td class="typo3-adminPanel-table-cell-break">{value}</td>
77 </f:for>
78 <td scope="col" class="typo3-adminPanel-table-cell-space"></td>
79 <td class="typo3-adminPanel-table-cell-time">
80 <div class="typo3-adminPanel-progress">
81 <div class="typo3-adminPanel-progress-bar" style="width:{query.executionMS * 1000 / totalTime * 100}%;"></div>
82 <div class="typo3-adminPanel-progress-value"><f:format.number decimals="2">{query.executionMS * 1000}</f:format.number></div>
83 </div>
84 </td>
85 </tr>
86 </f:for>
87 </tbody>
88 </table>
89 </div>
90 </f:if>
91 </div>
92 </div>
93 </f:for>
94 </div>
95 </html>