Add internal speed pages
This commit is contained in:
parent
d5b21935ae
commit
92e2b45ada
7 changed files with 205 additions and 18 deletions
5
templates/internal/left-sidebar.html
Normal file
5
templates/internal/left-sidebar.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="left-sidebar">
|
||||
{{ make_tab_item('problem', 'fa fa-list', url('internal_problem'), _('Problem')) }}
|
||||
{{ make_tab_item('request_time', 'fa fa-angle-right', url('internal_request_time'), _('Average speed')) }}
|
||||
{{ make_tab_item('slow_request', 'fa fa-asterisk', url('internal_slow_request'), _('Slow requests')) }}
|
||||
</div>
|
|
@ -25,9 +25,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block left_sidebar %}
|
||||
<div class="left-sidebar">
|
||||
{{ make_tab_item('problem', 'fa fa-list', url('internal_problem'), _('Problem')) }}
|
||||
</div>
|
||||
{% include "internal/left-sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block middle_content %}
|
28
templates/internal/request_time.html
Normal file
28
templates/internal/request_time.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
{% extends "two-column-content.html" %}
|
||||
|
||||
{% block left_sidebar %}
|
||||
{% include "internal/left-sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block middle_content %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>URL Name</th>
|
||||
<th>Pattern</th>
|
||||
<th><a href="{{current_path}}?order=time">Time (ms)</a></th>
|
||||
<th><a href="{{current_path}}?order=count">Count</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for page in pages %}
|
||||
<tr>
|
||||
<td><a href="{{detail_path}}?url_name={{page['url_name']}}">{{page['url_name']}}</a></td>
|
||||
<td>{{page['pattern']}}</td>
|
||||
<td>{{page['time'] | floatformat(2)}}</td>
|
||||
<td>{{page['count']}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
36
templates/internal/request_time_detail.html
Normal file
36
templates/internal/request_time_detail.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% extends "two-column-content.html" %}
|
||||
|
||||
{% block left_sidebar %}
|
||||
{% include "internal/left-sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block middle_content %}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Profile</th>
|
||||
<th>URL</th>
|
||||
<th>Method</th>
|
||||
<th><a href="{{current_path}}?order=response_time&url_name={{url_name}}">Time (ms)</a></th>
|
||||
<th><a href="{{current_path}}?order=date&url_name={{url_name}}">Date</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for request in requests %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if request['profile'] %}
|
||||
<a href="/user/{{request['profile']}}">{{request['profile']}}</a>
|
||||
{% else %}
|
||||
None
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{request['url']}}</td>
|
||||
<td>{{request['method']}}</td>
|
||||
<td>{{request['response_time'] | floatformat(2)}}</td>
|
||||
<td>{{request['date']}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue