blob: a27a1219135b9d0e083f9377ea2f8837158dcd54 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "base.html" %}
2
3{% load static %}
4{% load projecttags %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -05005{% load project_url_tag %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006{% load humanize %}
7
Patrick Williamsf1e5d692016-03-30 15:21:19 -05008{% block title %} All builds - Toaster {% endblock %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009{% block extraheadcontent %}
10<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
11<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
12<link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'>
13<script src="/static/js/jquery-ui.min.js"></script>
14<script src="/static/js/filtersnippet.js"></script>
15{% endblock %}
16
17{% block pagecontent %}
18
19{% if last_date_from and last_date_to %}
20<script>
21 // initialize the date range controls
22 $(document).ready(function () {
23 date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}');
24 date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}');
25 });
26</script>
27{%endif%} {# last_date_from and last_date_to #}
28
29<div class="row-fluid">
30
31 {% include "mrb_section.html" %}
32
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033 <div class="page-header top-air">
34 <h1>
35 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
36 {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
37 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
38 No builds found
39 {%else%}
40 All builds
41 {%endif%}
42 </h1>
43 </div>
44
45 {% if objects.paginator.count == 0 %}
46 <div class="row-fluid">
47 <div class="alert">
48 <form class="no-results input-append" id="searchform">
49 <input id="search" name="search" class="input-xxlarge" type="text" value="
50 {% if request.GET.search %}
51 {{request.GET.search}}
52 {% endif %}"/>
53 {% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
54 <button class="btn" type="submit" value="Search">Search</button>
55 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
56 </form>
57 </div>
58 </div>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050059 {% else %}
60 {% include "basetable_top.html" %}
61 <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
62 {% for build in objects %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050063 <tr class="data" data-table-build-result="{{ build.id }}">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050064 <td class="outcome">
Patrick Williamsf1e5d692016-03-30 15:21:19 -050065 <a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> &nbsp;
66 </td>
67 <td class="target">
68 {% for t in build.target_set.all %}
69 <a href="{% url "builddashboard" build.id %}">
70 {% if t.task %}
71 {{t.target}}:{{t.task}}
72 {% else %}
73 {{t.target}}
74 {% endif %}
75 </a> <br />
76 {% endfor %}
77 </td>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050078 <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
79 <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
80 <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
81 <td class="failed_tasks error">
82 {% query build.task_build outcome=4 order__gt=0 as exectask%}
83 {% if exectask.count == 1 %}
84 <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
85 <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
86 <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
87 </a>
88 {% elif exectask.count > 1%}
89 <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
90 {%endif%}
91 </td>
92 <td class="errors.count errors_no">
93 {% if build.errors.count %}
94 <a class="errors.count error" href="{% url "builddashboard" build.id %}#errors">{{build.errors.count}} error{{build.errors.count|pluralize}}</a>
95 {%endif%}
96 </td>
97 <td class="warnings.count warnings_no">{% if build.warnings.count %}<a class="warnings.count warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings.count}} warning{{build.warnings.count|pluralize}}</a>{%endif%}</td>
98 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent_seconds|sectohms}}</a></td>
99 <td class="output">
100 {% if build.outcome == build.SUCCEEDED %}
101 <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
102 {% endif %}
103 </td>
Patrick Williamsf1e5d692016-03-30 15:21:19 -0500104 <td class="project-name">
105 <a href="{% project_url build.project %}">{{build.project.name}}</a>
106 {% if build.project.is_default %}
107 <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project shows information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
108 {% endif %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500109 </td>
110 </tr>
111
112 {% endfor %}
113
114
115 {% include "basetable_bottom.html" %}
116 {% endif %} {# objects.paginator.count #}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500117</div><!-- end row-fluid-->
118
119{% endblock %}