blob: 50697a159be1f06131714470c3c1ef981f25de9f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "baseprojectbuildspage.html" %}
2{% load projecttags %}
3{% load humanize %}
4
Patrick Williamsf1e5d692016-03-30 15:21:19 -05005{% block title %} Builds - {{project.name}} - Toaster {% endblock %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006{% block extraheadcontent %}
7<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
8<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
9<link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'>
10<script src="/static/js/jquery-ui.min.js"></script>
11<script src="/static/js/filtersnippet.js"></script>
12{% endblock %}
13
14{% block projectinfomain %}
15
16<script>
17 // initialize the date range controls
18 $(document).ready(function () {
Patrick Williamsd7e96312015-09-22 08:09:05 -050019 date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}');
20 date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}');
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 });
22</script>
23
Patrick Williamsf1e5d692016-03-30 15:21:19 -050024 {% with mrb_type='project' %}
25 {% include "mrb_section.html" %}
26 {% endwith %}
27
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028 <h2>
29 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050030 {{objects.paginator.count}} project build{{objects.paginator.count|pluralize}} found
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050032 No project builds found
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033 {%else%}
Patrick Williamsf1e5d692016-03-30 15:21:19 -050034 All project builds
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035 {%endif%}
36 <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
37 </h2>
38
39
40 {% if objects.paginator.count == 0 %}
41 {% if request.GET.filter or request.GET.search %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060042 <div class="row">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043 <div class="alert">
44 <form class="no-results input-append" id="searchform">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060045 <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="input-append-addon btn" tabindex="-1"><i class="glyphicon glyphicon-remove"></i></a>{% endif %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046 <button class="btn" type="submit" value="Search">Search</button>
47 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
48 </form>
49 </div>
50 </div>
51 {% else %}
52 <div class="alert alert-info">
53 <p class="lead">
54 This project has no builds.
55 </p>
56 </div>
57 {% endif %}
58
59 {% else %}
60
61 {% include "basetable_top.html" %}
62 <!-- 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 -->
63 {% for build in objects %} {# if we have a build, just display it #}
64 <tr class="data">
65 <td class="outcome"><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>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050066 {% if build.cooker_log_path %}
67 &nbsp;
68 <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
69 <i class="icon-download-alt" title="Download build log"></i>
70 </a>
71 {% endif %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050072 </td>
73
Patrick Williamsf1e5d692016-03-30 15:21:19 -050074 <td class="target">
75 {% for t in build.target_set.all %}
76 <a href="{% url "builddashboard" build.id %}">
77 {% if t.task %}
78 {{t.target}}:{{t.task}}
79 {% else %}
80 {{t.target}}
81 {% endif %}
82 </a> <br />
83 {% endfor %}
84 </td>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050085 <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
86 <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
87 <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
88 <td class="failed_tasks error">
89 {% query build.task_build outcome=4 order__gt=0 as exectask%}
90 {% if exectask.count == 1 %}
91 <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
92 <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
93 <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
94 </a>
95 {% elif exectask.count > 1%}
96 <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
97 {%endif%}
98 </td>
99 <td class="errors.count">
100 {% if build.errors.count %}
101 <a class="errors.count error" href="{% url "builddashboard" build.id %}#errors">{{build.errors.count}} error{{build.errors.count|pluralize}}</a>
102 {%endif%}
103 </td>
104 <td class="warnings.count">{% 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>
105 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent_seconds|sectohms}}</a></td>
106 <td class="output">
107 {% if build.outcome == build.SUCCEEDED %}
108 <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
109 {% endif %}
110 </td>
111 </tr>
112 {% endfor %}
113
114
115 {% include "basetable_bottom.html" %}
116{% endif %}
117
118{% endblock %}