Commits

Christoph Zwerschke committed 01a3163

Clean-up section templates, strip outer html tags.

  • Participants
  • Parent commits 91d47a0

Comments (0)

Files changed (6)

File tgext/debugbar/sections/templates/controllers.html

 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-      py:strip="">
+	xmlns:py="http://genshi.edgewall.org/"
+	py:strip="True">
 <h1>Mounted Controllers</h1>
 <table class="tgdb_table">
-    <tr>
-        <th>Path</th>
-        <th>Controller</th>
-        <th>Exposed Methods</th>
-    </tr>
-    <tr py:for="i, entry in enumerate(controllers.iteritems())" class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
-        <td><strong>${entry[0]}</strong></td>
-        <td>${entry[1]['controller']}</td>
-        <td>${', '.join(entry[1]['exposed_methods'])}</td>
-    </tr>
+	<tr>
+		<th>Path</th>
+		<th>Controller</th>
+		<th>Exposed Methods</th>
+	</tr>
+	<tr py:for="i, entry in enumerate(controllers.iteritems())" class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
+		<td><strong>${entry[0]}</strong></td>
+		<td>${entry[1]['controller']}</td>
+		<td>${', '.join(entry[1]['exposed_methods'])}</td>
+	</tr>
 </table>
-</html>
+</html>

File tgext/debugbar/sections/templates/logging.html

 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-      py:strip="">
+	xmlns:py="http://genshi.edgewall.org/"
+	py:strip="True">
 <h1>Log Messages</h1>
 <table class="tgdb_table">
-    <tr>
-        <th>Level</th>
-        <th>Time</th>
-        <th>Message</th>
-        <th>Location</th>
-    </tr>
-    <tr py:for="i, record in enumerate(records)" class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
-        <td><strong>${record['level']}</strong></td>
-        <td>${record['time']}</td>
-        <td>${record['message']}</td>
-        <td title="${record['file_long']}:${record['line']}">${record['file']}:${record['line']}</td>
-    </tr>
+	<tr>
+		<th>Level</th>
+		<th>Time</th>
+		<th>Message</th>
+		<th>Location</th>
+	</tr>
+	<tr py:for="i, record in enumerate(records)" class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
+		<td><strong>${record['level']}</strong></td>
+		<td>${record['time']}</td>
+		<td>${record['message']}</td>
+		<td title="${record['file_long']}:${record['line']}">${record['file']}:${record['line']}</td>
+	</tr>
 </table>
-</html>
+</html>

File tgext/debugbar/sections/templates/ming.html

 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-      py:strip="">
+	xmlns:py="http://genshi.edgewall.org/"
+	py:strip="True">
 <h1>Queries Performed</h1>
 <table class="tgdb_table" style="width:90%;">
 	<thead>
 		<tr>
-            <th>Actions</th>
+			<th>Actions</th>
 			<th>Time&nbsp;(ms)</th>
 			<th>Command</th>
 			<th>Params</th>
 		</tr>
 	</thead>
 	<tbody>
-    <tr py:for="i, query in enumerate(queries)" style="background-color:#f8f8f8;"
-        class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
-        <td>
-            <a href="${tg.url('/_debugbar/perform_ming', params=dict(collection=query['collection'], command=query['command'], params=query['params'], duration=query['duration']))}"
-               style="text-decoration: none;line-height:1.6em;">RESULTS</a>
-            <br/>
-        </td>
-        <td>${'%.4f' % query['duration']}</td>
-        <td><strong>${Markup(query['collection'])}</strong>.<em>${Markup(query['command'])}</em></td>
-        <td>${Markup(query['filter'])}</td>
-    </tr>
+		<tr py:for="i, query in enumerate(queries)" style="background-color:#f8f8f8;"
+			class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
+			<td>
+				<a href="${tg.url('/_debugbar/perform_ming', params=dict(collection=query['collection'], command=query['command'], params=query['params'], duration=query['duration']))}"
+					style="text-decoration: none;line-height:1.6em;">RESULTS</a>
+				<br/>
+			</td>
+			<td>${'%.4f' % query['duration']}</td>
+			<td><strong>${Markup(query['collection'])}</strong>.<em>${Markup(query['command'])}</em></td>
+			<td>${Markup(query['filter'])}</td>
+		</tr>
 	</tbody>
 </table>
-</html>
+</html>

File tgext/debugbar/sections/templates/request.html

 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-      py:strip="">
+	xmlns:py="http://genshi.edgewall.org/"
+	py:strip="True">
 <div py:for="title, entries in vars.iteritems()">
-    <h1>${title}</h1>
-    <table class="tgdb_table" py:if="entries">
-        <tr>
-            <th>Name</th>
-            <th>Value</th>
-        </tr>
-        <tr py:for="i, entry in enumerate(entries)" class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
-            <td><strong>${entry[0]}</strong></td>
-            <td>${entry[1]}</td>
-        </tr>
-    </table>
+	<h1>${title}</h1>
+	<table class="tgdb_table" py:if="entries">
+		<tr>
+			<th>Name</th>
+			<th>Value</th>
+		</tr>
+		<tr py:for="i, entry in enumerate(entries)" class="${'tgdb_row_odd' if i%2 else 'tgdb_row_even'} tgdb_row">
+			<td><strong>${entry[0]}</strong></td>
+			<td>${entry[1]}</td>
+		</tr>
+	</table>
 </div>
-</html>
+</html>

File tgext/debugbar/sections/templates/sqla.html

 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-      py:strip="">
+	xmlns:py="http://genshi.edgewall.org/"
+	py:strip="True">
 <h1>Queries Performed</h1>
 <table class="tgdb_table" style="width:90%;">
 	<thead>
 		<tr>
-            <th>Actions</th>
+			<th>Actions</th>
 			<th>Time&nbsp;(ms)</th>
 			<th>Query</th>
 			<th>Params</th>
 		</tr>
 	</thead>
 	<tbody>
-    <tr py:for="query in queries" class="tgdb_row">
-        <td>
-            <div py:if="query['is_select']" >
-                <a href="${tg.url('/_debugbar/perform_sql', params=dict(stmt=query['raw_sql'], params=query['params'], engine_id=query['engine_id'], duration=query['duration']))}"
-                   style="text-decoration: none;line-height:1.6em;">RESULTS</a>
-                <br/>
-                <a href="${tg.url('/_debugbar/explain_sql', params=dict(stmt=query['raw_sql'], params=query['params'], engine_id=query['engine_id'], duration=query['duration']))}"
-                   style="text-decoration: none;line-height:1.6em;">EXPLAIN</a>
-            </div>
-        </td>
-        <td>${'%.4f' % query['duration']}</td>
-        <td>${Markup(query['sql'])}</td>
-        <td>${Markup(query['params'])}</td>
-    </tr>
+		<tr py:for="query in queries" class="tgdb_row">
+			<td>
+				<div py:if="query['is_select']" >
+					<a href="${tg.url('/_debugbar/perform_sql', params=dict(stmt=query['raw_sql'], params=query['params'], engine_id=query['engine_id'], duration=query['duration']))}"
+						style="text-decoration: none;line-height:1.6em;">RESULTS</a>
+					<br/>
+					<a href="${tg.url('/_debugbar/explain_sql', params=dict(stmt=query['raw_sql'], params=query['params'], engine_id=query['engine_id'], duration=query['duration']))}"
+						style="text-decoration: none;line-height:1.6em;">EXPLAIN</a>
+				</div>
+			</td>
+			<td>${'%.4f' % query['duration']}</td>
+			<td>${Markup(query['sql'])}</td>
+			<td>${Markup(query['params'])}</td>
+		</tr>
 	</tbody>
 </table>
-</html>
+</html>

File tgext/debugbar/sections/templates/timing.html

 <html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:py="http://genshi.edgewall.org/"
-      py:strip="">
+	xmlns:py="http://genshi.edgewall.org/"
+	py:strip="True">
 
 <h1>Timing</h1>
 <table class="tgdb_table">
-    <tr>
-        <th>Action</th>
-        <th>Time Spent</th>
-    </tr>
-    <tr py:for="i, entry in enumerate(vars.iteritems())" class="${'tgdb_row_even' if i%2 else 'tgdb_row_odd'} tgdb_row">
-        <td><strong>${entry[0]}</strong></td>
-        <td>${'%.4f' % entry[1]}&nbsp;ms</td>
-    </tr>
+	<tr>
+		<th>Action</th>
+		<th>Time Spent</th>
+	</tr>
+	<tr py:for="i, entry in enumerate(vars.iteritems())" class="${'tgdb_row_even' if i%2 else 'tgdb_row_odd'} tgdb_row">
+		<td><strong>${entry[0]}</strong></td>
+		<td>${'%.4f' % entry[1]}&nbsp;ms</td>
+	</tr>
 </table>
 
 <h1>Template</h1>
 <table class="tgdb_table">
-    <tr>
-        <th>Time</th>
-        <th>Engine</th>
-        <th>Template</th>
-        <th>Content Type</th>
-    </tr>
-    <tr class="tgdb_row tgdb_row_odd">
-        <td>${'%.4f' % vars['Render Time']}&nbsp;ms</td>
-        <td>${render_info.get('engine_name')}</td>
-        <td>${render_info.get('template_name')}</td>
-        <td>${render_info.get('content_type')}</td>
-    </tr>
+	<tr>
+		<th>Time</th>
+		<th>Engine</th>
+		<th>Template</th>
+		<th>Content Type</th>
+	</tr>
+	<tr class="tgdb_row tgdb_row_odd">
+		<td>${'%.4f' % vars['Render Time']}&nbsp;ms</td>
+		<td>${render_info.get('engine_name')}</td>
+		<td>${render_info.get('template_name')}</td>
+		<td>${render_info.get('content_type')}</td>
+	</tr>
 </table>
 
 <h1>Profiling</h1>
 <table class="tgdb_table">
-    <thead>
-        <tr>
-            <th>Calls</th>
-            <th>Total</th>
-            <th>Percall</th>
-            <th>Cumu</th>
-            <th>CumuPer</th>
-            <th>Func</th>
-        </tr>
-    </thead>
-    <tbody>
-        <tr py:for="i, row in enumerate(function_calls)" class="${i%2 and 'tgdb_row_even' or 'tgdb_row_odd'} tgdb_row">
-            <td>${row['ncalls']}</td>
-            <td>${row['tottime']}</td>
-            <td>${'%.4f' % row['percall']}</td>
-            <td>${row['cumtime']}</td>
-            <td>${'%.4f' % row['percall_cum']}</td>
-            <td title="${row['filename_long']}">${row['filename']}</td>
-        </tr>
-    </tbody>
+	<thead>
+		<tr>
+			<th>Calls</th>
+			<th>Total</th>
+			<th>Percall</th>
+			<th>Cumu</th>
+			<th>CumuPer</th>
+			<th>Func</th>
+		</tr>
+	</thead>
+	<tbody>
+		<tr py:for="i, row in enumerate(function_calls)" class="${i%2 and 'tgdb_row_even' or 'tgdb_row_odd'} tgdb_row">
+			<td>${row['ncalls']}</td>
+			<td>${row['tottime']}</td>
+			<td>${'%.4f' % row['percall']}</td>
+			<td>${row['cumtime']}</td>
+			<td>${'%.4f' % row['percall_cum']}</td>
+			<td title="${row['filename_long']}">${row['filename']}</td>
+		</tr>
+	</tbody>
 </table>
-</html>
+</html>