~launchpad-pqm/python-oops-tools/trunk

« back to all changes in this revision

Viewing changes to src/oopstools/oops/templates/summary.html

  • Committer: Robert Collins
  • Date: 2011-10-13 20:18:51 UTC
  • Revision ID: robertc@robertcollins.net-20111013201851-ym8jmdhoeol3p83s
Export of cruft-deleted tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{% load oops_extras %}
 
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
3
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
  <head>
 
6
    <title>OOPS Report Summary</title>
 
7
    <style type="text/css" media="screen">
 
8
      @import url("/oops/static/oops.css");
 
9
    </style>
 
10
  </head>
 
11
  <body>
 
12
    {% if summary.count > 0 %}
 
13
    <div id="summary">
 
14
    <div id="period">
 
15
      <ul>
 
16
        <li>Log starts: {{summary.start|date:"Y-m-d H:i:s"}}</li>
 
17
        <li>Analyzed period: {{summary.period}} days</li>
 
18
        <li>Total exceptions: {{summary.count}}</li>
 
19
        {% if summary.period > 1 %}
 
20
        <li>Average exceptions per day:
 
21
          {{summary.count|div:summary.period}}</li>
 
22
        {% endif %}
 
23
      </ul>
 
24
    </div>
 
25
    <table class="stats-table" id="stats">
 
26
      <ul>
 
27
      {% for section in summary.sections|slice:"3:" %}
 
28
        <li><a href="#{{section.section_id}}">
 
29
          {{section.error_count}} {{section.title}}</a></li>
 
30
      {% endfor %}
 
31
      </ul>
 
32
    </table>
 
33
    <div id="{{durations.section_id}}">
 
34
      <h2>{{durations.title}}</h2>
 
35
      <table class="top-value-table">
 
36
        <thead>
 
37
          <tr>
 
38
            <th>Duration</th>
 
39
            <th>OOPS ID</th>
 
40
            <th>Page</th>
 
41
          </tr>
 
42
        </thead>
 
43
        <tbody>
 
44
          {% for duration, oopsids, pageid in durations.top_errors %}
 
45
            <tr>
 
46
              <td>{{ duration|topvalueformat:durations.field_format }}</td>
 
47
              <td>
 
48
                <a href="{{oopsids|first|get_absolute_url}}">{{oopsids|first}}</a>
 
49
              </td>
 
50
              <td>{{pageid}}</td>
 
51
            </tr>
 
52
          {% endfor %}
 
53
        </tbody>
 
54
      </table>
 
55
    </div>
 
56
    <div id="{{stmt_counts.section_id}}">
 
57
      <h2>{{stmt_counts.title}}</h2>
 
58
      <table class="top-value-table">
 
59
        <thead>
 
60
          <tr>
 
61
            <th>Count</th>
 
62
            <th>OOPS ID</th>
 
63
            <th>Page</th>
 
64
          </tr>
 
65
        </thead>
 
66
        <tbody>
 
67
          {% for count, oopsids, pageid in stmt_counts.top_errors %}
 
68
          <tr>
 
69
            <td>{{ count|topvalueformat:stmt_counts.field_format }}</td>
 
70
            <td>
 
71
              <a href="{{oopsids|first|get_absolute_url}}">{{oopsids|first}}</a>
 
72
            </td>
 
73
            <td>{{pageid}}</td>
 
74
          </tr>
 
75
          {% endfor %}
 
76
        </tbody>
 
77
      </table>
 
78
    </div>
 
79
    <div id="{{timeout_counts.section_id}}">
 
80
      <h2>{{timeout_counts.title}}</h2>
 
81
      <table class="top-value-table">
 
82
        <thead>
 
83
          <tr>
 
84
            <th>Hard</th>
 
85
            <th>Soft</th>
 
86
            <th>Page</th>
 
87
          </tr>
 
88
        </thead>
 
89
        <tbody>
 
90
          {% for data in timeout_counts.time_out_counts %}
 
91
          <tr>
 
92
            <th>{{data.hard_timeouts_count}}</th>
 
93
            <th>{{data.soft_timeouts_count}}</th>
 
94
            <th>{{data.pageid}}</th>
 
95
          </tr>
 
96
          {% endfor %}
 
97
        </tbody>
 
98
      </table>
 
99
    </div>
 
100
    {% for section in summary.sections|slice:"3:" %}
 
101
    <div class="oops-section" id="{{section.section_id}}">
 
102
      <h2>{{section.title}}</h2>
 
103
      {% for group in section.groups %}
 
104
        <div class="exception">
 
105
          {{group.count}} <b>{{group.etype}}</b>: {{group.evalue}}
 
106
        </div>
 
107
        {% if group.bug %}
 
108
        Bug: <a href="https://launchpad.net/bugs/{{group.bug}}">{{group.bug}}</a>
 
109
        {% endif %}
 
110
        <div class="pct">
 
111
          {{group.formatted_http_method_count}}
 
112
          Robots: {{group.bot_count}}
 
113
          Local:  {{group.local_referrer_count}}
 
114
        </div>
 
115
        <div class="errurl">
 
116
          <ul class="oops">
 
117
          {% for data in group.top_urls %}
 
118
          <li>{{data.count}} <a href="{{data.escaped_url}}">{{data.escaped_url}}</a>
 
119
          ({{data.pageid}})
 
120
            <li>
 
121
            {% for oops in data.errors|slice:":5" %}
 
122
              <a href="{{oops|get_absolute_url}}">{{oops}}</a>
 
123
            {% endfor %}
 
124
            </li>
 
125
          </li>
 
126
          {% endfor %}
 
127
          {% if group.url_count > 5 %}
 
128
            <li>[{{group.url_count|sub:"5"}} more]</li>
 
129
          {% endif %}
 
130
          </ul>
 
131
        </div>
 
132
      {% endfor %}
 
133
    </div>
 
134
    {% endfor %}
 
135
    </div>
 
136
    {% else %}
 
137
      <div id="nosummary">
 
138
        No OOPS found
 
139
      </div>
 
140
    {% endif %}
 
141
  </body>
 
142
</html>