aboutsummaryrefslogtreecommitdiffstats
path: root/templates/latest-errors.html
blob: b9f081eafad0ec287a7d38fe4ee027ec329b0c0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
{% extends "base.html" %}
{% load projecttags %}

{% block head %}

  {% if mode == results_mode.LATEST %}
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{% url 'errors_feed' %}" />
  {% elif mode == results_mode.SPECIAL_SUBMITTER %}
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{% url 'special_submitter_errors_feed' %}" />
  {% endif %}

{% endblock %}

{% block content %}

<div class="row-fluid">
  {% if mode == results_mode.SEARCH %}
  <h1 class="page-header">
  {{build_failures.paginator.count}}
  errors found for "{{request.GET.query}}" {% if request.GET.filter %} filtered by "{{ request.GET.filter }}"
  {% endif %}
  </h1>

  {% elif mode == results_mode.BUILD %}
  <h1 class="page-header">
  {{build_failures.paginator.count}}
  errors for Build #{{args.build_id}}
  </h1>

  {% elif mode == results_mode.SIMILAR_TO %}
  <h1 class="page-header">
  {{build_failures.paginator.count}}
  Similar errors to <a href="{%url 'details' args.fail_id %}">#{{args.fail_id}}</a>
  </h1>
  {% endif %}
   <div class="navbar">
    <div class="navbar-inner">
      {% if request.GET.filter and not request.GET.query and build_failures and build_failures.paginator.count != 0 %}
      <span class="brand"> {{build_failures.paginator.count}} errors found filtered by "{{request.GET.filter}}"</span>
      {% endif %}

      <div class="pull-right">
        <span class="help-inline" style="padding-top:5px;">Show rows: </span>
        <select style="margin-top:5px;margin-bottom:0px;" class="input-mini pagesize">
          {% with "10 25 50 100 150" as list%}
          {% for i in list.split %}
          {% if request.session.limit == i|add:0 %}
          <option value="{{i}}" class="active" selected>{{i}}</option>
          {% else %}
          <option value="{{i}}">{{i}}</option>
          {% endif %}
          {% endfor %}
          {% endwith %}
        </select>
      </div>
      <span class="divider-vertical pull-right"></span>
      <div class="btn-group pull-right">

        <button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
          <span class="caret"></span>
        </button>
        <ul id='editcol' class="dropdown-menu">
          {% for col in tablecols %}
                <li>
               {# Some columns are required as minimum so disable unchecking #}
                  <label class="checkbox {%if col.disable_toggle%}muted{%endif%}">
                    <input type="checkbox" class="col-toggle" id="checkbox-{{col.clclass}}"  value="{{col.clclass}}" checked="checked" {%if col.disable_toggle%}disabled="disabled"{%endif%} data-field="{{col.field}}" />
                    {{col.name}}
                  </label>
                </li>
                {% endfor %}
              </ul>
            </div>
          </div> <!-- navbar-inner -->
        </div>
        {% if build_failures or build_failures.paginator.count != 0 %}
        <table class="table table-bordered table-hover" id="errors-table">
          <thead>
            <tr>
              {% for col in tablecols %}
              {% if col.field %}
              {% if  col.clclass in request.GET.type %}
                <th class="filter-applied {{col.clclass}}" >
                  <span class="muted">
                    {{col.name}}
                  </span>
                &nbsp;
                <a href="#" id="clear-filter-btn" class="btn btn-mini pull-right" title="Clear filter">&#x2716</a>

                {% elif request.GET.order_by == col.field or request.GET.order_by == "-"|add:col.field %}
                {# If a sort is applied #}
                <th class="{{col.clclass}}">

                  {% if request.GET.order_by == "-"|add:col.field %}
                  <a href="#" class="sort-col sorted" data-order-by="{{col.field}}" >{{col.name}}</a>
                  <span class="sorting-arrows" style="visibility: visible">&#9650</span>
                  {% else %}
                  <a href="#" class="sort-col sorted" data-order-by="-{{col.field}}" >{{col.name}}</a>
                   <span class="sorting-arrows" style="visibility: visible">&#9660</span>
                   {% endif %}
                {% else %}
                {# default case is sorted by submitted_on #}
                <th class="{{col.clclass}}">


                  {% if col.clclass == "submitted_on" and not request.GET.order_by %}
                   <a href="#" class="sort-col sorted" data-order-by="-{{col.field}}" >{{col.name}}</a>
                   <span class="sorting-arrows" style="visibility: visible">&#9660</span>

                  {% elif col.clclass == "failure" %}
                  {{col.name}}
                  {% else %}
                  <a href="#" class="sort-col" data-order-by="{{col.field}}" >{{col.name}}</a>

                   <span class="sorting-arrows">&#9660</span>
                   {% endif %}
                  </th>
                {% endif %}

                {% else %}
                <th class="{{col.class}} muted">{{col.name}}</th>
                {% endif %}

                {%endfor%}
              </tr>
            </thead>
            <tbody>
              {%for build_fail in build_failures %}
              {% url "details" build_fail.id as details_url %}
              <tr class="data">
                <td class="submitted_on"> <a href="{{details_url}}">{{ build_fail.BUILD.DATE|date:"d/m/y H:i"}}</a></td>

                <td class="error_type"><a href="{{details_url}}">{{ build_fail.BUILD.get_ERROR_TYPE_display }}</a>
                  <a class="filter" href="#" data-filter="{{build_fail.BUILD.ERROR_TYPE}}" data-type="error_type">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.get_ERROR_TYPE_display}}"></i>
                  </a>
                </td>

                <td class="failure">
                  {% if build_fail.BUILD.ERROR_TYPE == error_types.RECIPE %}
                  <a href="{{details_url}}">
                        {{ build_fail.RECIPE }}:
                        {{ build_fail.TASK }}</a>
                  <a class="filter" href="#" data-filter=" {{ build_fail.RECIPE }}: {{build_fail.TASK}}" data-type="failure">
                    <i class="icon-filter hover" title="Filter by {{ build_fail.RECIPE }}: {{build_fail.TASK}}"></i>
                  </a>
                  {% else %}
                  <a href="{{details_url}}">{{ build_fail.TASK }}</a>
                  <a class="filter" href="#" data-filter="{{build_fail.TASK}}" data-type="failure">
                    <i class="icon-filter hover" title="Filter by {{build_fail.TASK}}"></i>
                  </a>
                  {% endif %}
                </td>

                <td class="machine"><a href="{{details_url}}">{{ build_fail.BUILD.MACHINE }}</a>
                  <a class="filter"  href="#" data-filter="{{build_fail.BUILD.MACHINE}}" data-type="machine">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.MACHINE}}"></i>
                  </a>

                </td>
                <td class="distro"><a href="{{details_url}}">{{ build_fail.BUILD.DISTRO }}</a>
                  <a class="filter"  href="#" data-filter="{{build_fail.BUILD.DISTRO}}" data-type="distro">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.DISTRO}}"></i>
                  </a>

                </td>
                <td class="build_sys"><a href="{{details_url}}">{{ build_fail.BUILD.BUILD_SYS }}</a>
                  <a class="filter"  href="#" data-filter="{{build_fail.BUILD.BUILD_SYS}}" data-type="build_sys">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.BUILD_SYS}}"></i>
                  </a>

                </td>
                <td class="target_sys"><a href="{{details_url}}">{{ build_fail.BUILD.TARGET_SYS }}</a>
                  <a class="filter"  href="#" data-filter="{{build_fail.BUILD.TARGET_SYS}}" data-type="target_sys">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.TARGET_SYS}}"></i>
                  </a>

                </td>
                <td class="nativelsbstring"><a href="{{details_url}}">{{ build_fail.BUILD.NATIVELSBSTRING }}</a>
                  <a class="filter"  href="#" data-filter="{{build_fail.BUILD.NATIVELSBSTRING}}" data-type="nativelsbstring">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.NATIVELSBSTRING}}"></i>
                  </a>

                </td>
                <td class="branch"><a href="{{details_url}}">{{build_fail.BUILD.BRANCH}}</a>
                  <a class="filter"  href="#" data-filter="{{build_fail.BUILD.BRANCH}}" data-type="branch">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.BRANCH}}"></i>
                  </a>

                </td>
                <td class="commit">
                  <div class="btn" rel="popover"
                      data-content='
                      {{ build_fail.BUILD.COMMIT|escape}}
                      <p><a href="#" class="filter" style="visibility: visible" data-filter="{{build_fail.BUILD.COMMIT}}" data-type="commit" >Filter by commit</a>'
                      data-html="true"
                    >
                    {{ build_fail.BUILD.COMMIT|truncatechars:10}}

                  </div>
                </td>
                <td class="submitter"><a href="{{details_url}}">{{ build_fail.BUILD.NAME }} </a>
                  <a class="filter"  href="#" data-filter="{{build_fail.BUILD.NAME}}" data-type="submitter">
                    <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.NAME}}"></i>
                  </a>

                </td>
                <td class="similar">
                  {% with build_fail.get_similar_fails_count as similar_count %}
                  {% if similar_count != 0 %}
                  <a href="{% url "similar" build_fail.id %}">{{similar_count}}</a>
                  {% else %}
                  {{similar_count}}
                  {% endif %}
                  {% endwith %}
                </td>
              </tr>
              {%endfor%}
            </tbody>
          </table>

          <!-- Show pagination controls -->
          <div class="pagination">
            <ul>
              {%if build_failures.has_previous %}
              <li><a href="#" data-page="{{build_failures.previous_page_number}}">&laquo;</a></li>
              {%else%}
              <li class="disabled"><a href="#">&laquo;</a></li>
              {%endif%}
              {% for i in build_failures.paginator.page_range %}
              {# Show the buttons 3 either side of the current page #}
              {% if i <= build_failures.number|add:3 and  i >= build_failures.number|add:-3 %}
                <li {%if i == build_failures.number %} class="active" {%endif%}><a href="#" data-page="{{i}}">{{i}}</a></li>
                {% endif %}
              {% endfor %}
              {%if build_failures.has_next%}
              <li><a href="#" data-page="{{build_failures.next_page_number}}">&raquo;</a></li>
              {%else%}
              <li class="disabled"><a href="#">&raquo;</a></li>
              {%endif%}
            </ul>
            <div class="pull-right">
              <span class="help-inline" style="padding-top:5px;">Show rows:</span>
              <select style="margin-top:5px;margin-bottom:0px;" class="input-mini pagesize">
                {% with "10 25 50 100 150" as list%}
                {% for i in list.split %}
                {% if request.session.limit == i|add:0 %}
                <option value="{{i}}" selected>{{i}}</option>
                {% else %}
                <option value="{{i}}">{{i}}</option>
                {% endif %}
                {% endfor %}
                {% endwith %}
              </select>
            </div>
          </div>

        {% else %}
        <div class="alert">Sorry no results found</div>
        {# end if paginator.count != 0 #}
        {% endif %}
        </div> <!-- row-fluid -->

        {% endblock %}