diff options
| author | David Cramer | 2011-04-22 14:47:36 -0700 | 
|---|---|---|
| committer | David Cramer | 2011-04-22 14:47:36 -0700 | 
| commit | 249247f9c7a5027d444471526859ee86c06a1f1a (patch) | |
| tree | d9113c6e65935d23d3ac0ea040a7badc24898bd3 /debug_toolbar/templates | |
| parent | 95dde8d0bc36146c2b97b5c6e6f015bc264b3bd2 (diff) | |
| download | django-debug-toolbar-249247f9c7a5027d444471526859ee86c06a1f1a.tar.bz2 | |
Initial refactor of toggline so that profiling matches sql
Diffstat (limited to 'debug_toolbar/templates')
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/profiling.html | 29 | ||||
| -rw-r--r-- | debug_toolbar/templates/debug_toolbar/panels/sql.html | 4 | 
2 files changed, 21 insertions, 12 deletions
diff --git a/debug_toolbar/templates/debug_toolbar/panels/profiling.html b/debug_toolbar/templates/debug_toolbar/panels/profiling.html index 95af495..61e72da 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/profiling.html +++ b/debug_toolbar/templates/debug_toolbar/panels/profiling.html @@ -1,22 +1,31 @@  {% load i18n %} - -  <table width="100%">  	<thead>  		<tr> -			<th>{% trans "ncalls" %}</th> -			<th>{% trans "tottime" %}<br/>({% trans "percall" %})</th> -			<th>{% trans "cumtime" %}<br/>({% trans "percall" %})</th> -			<th>{% trans "filename:lineno(function)" %}</th> -			<th>{% trans "toggle" %}</th> +			<th>{% trans "Call" %}</th> +			<th>{% trans "TotTime" %}</th> +			<th>{% trans "Per" %}</th> +			<th>{% trans "CumTime" %}</th> +			<th>{% trans "Per" %}</th> +			<th>{% trans "Count" %}</th>  		</tr>  	</thead>  	<tbody>  		{% for call in func_list %} -			<tr id="{{ call.id }}" class="djDebugProfileRow" style="background:{{ call.background }}" depth="{{ call.depth }}"> -				{{ call.as_row }} -				<td><a class="djDebugProfileToggle">Toggle Subcalls</a></td> +			<!--  style="background:{{ call.background }}" --> +			<tr id="{{ call.id }}" class="djDebugProfileRow{% for parent_id in call.parent_ids %} djToggleDetails_{{ parent_id }}{% endfor %}" depth="{{ call.depth }}"> +				<td> +					<div style="padding-left: {{ call.indent }}px;"> +						<a class="djProfileToggleDetails djToggleSwitch" data-toggle-id="{{ call.id }}" href="javascript:void(0)">+</a> +						<span class="stack">{{ call.func_std_string }}</span> +					</div> +				</td> +				<td>{{ call.tottime|floatformat:3 }}</td> +				<td>{{ call.tottime_per_call|floatformat:3 }}</td> +				<td>{{ call.cumtime|floatformat:3 }}</td> +				<td>{{ call.cumtime_per_call|floatformat:3 }}</td> +				<td>{{ call.count }}</td>  			</tr>  		{% endfor %}  	</tbody> diff --git a/debug_toolbar/templates/debug_toolbar/panels/sql.html b/debug_toolbar/templates/debug_toolbar/panels/sql.html index ba94b2f..ff05a9f 100644 --- a/debug_toolbar/templates/debug_toolbar/panels/sql.html +++ b/debug_toolbar/templates/debug_toolbar/panels/sql.html @@ -26,7 +26,7 @@  				<tr class="djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %}{% if query.is_slow %} djDebugRowWarning{% endif %}{% if query.starts_trans %} djDebugStartTransaction{% endif %}{% if query.ends_trans %} djDebugEndTransaction{% endif %}{% if query.in_trans %} djDebugInTransaction{% endif %}" id="sqlMain_{{ forloop.counter }}">  					<td class="color"><span style="background-color: rgb({{ query.rgb_color|join:", " }});"> </span></td>  					<td class="toggle"> -						<a class="djToggleSwitch" data-queryid="{{ forloop.counter }}" href="javascript:void(0)">+</a> +						<a class="djToggleSwitch" data-toggle-id="{{ forloop.counter }}" href="javascript:void(0)">+</a>  					</td>  					<td class="query">  						<div class="djDebugSqlWrap"> @@ -51,7 +51,7 @@  					{% endif %}  					</td>  				</tr> -				<tr class="djHiddenByDefault djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %}{% if query.is_slow %} djDebugRowWarning{% endif %}" id="sqlDetails_{{ forloop.counter }}"> +				<tr class="djUnselected djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %}{% if query.is_slow %} djDebugRowWarning{% endif %} djToggleDetails_{{ forloop.counter }}" id="sqlDetails_{{ forloop.counter }}">  					<td colspan="2"></td>  					<td colspan="4">  						<div class="djSQLDetailsDiv">  | 
