xref: /OK3568_Linux_fs/yocto/poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun{% extends "baseprojectbuildspage.html" %}
2*4882a593Smuzhiyun{% load projecttags %}
3*4882a593Smuzhiyun{% load humanize %}
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun{% block title %} Builds - {{project.name}} - Toaster {% endblock %}
6*4882a593Smuzhiyun{% block extraheadcontent %}
7*4882a593Smuzhiyun<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
8*4882a593Smuzhiyun<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
9*4882a593Smuzhiyun<link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'>
10*4882a593Smuzhiyun<script src="/static/js/jquery-ui.min.js"></script>
11*4882a593Smuzhiyun<script src="/static/js/filtersnippet.js"></script>
12*4882a593Smuzhiyun{% endblock %}
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun{% block projectinfomain %}
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun<script>
17*4882a593Smuzhiyun    // initialize the date range controls
18*4882a593Smuzhiyun    $(document).ready(function () {
19*4882a593Smuzhiyun        date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}');
20*4882a593Smuzhiyun        date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}');
21*4882a593Smuzhiyun    });
22*4882a593Smuzhiyun</script>
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun {% with mrb_type='project' %}
25*4882a593Smuzhiyun     {% include "mrb_section.html" %}
26*4882a593Smuzhiyun {% endwith %}
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun      <h2>
29*4882a593Smuzhiyun        {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
30*4882a593Smuzhiyun            {{objects.paginator.count}} project build{{objects.paginator.count|pluralize}} found
31*4882a593Smuzhiyun        {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
32*4882a593Smuzhiyun            No project builds found
33*4882a593Smuzhiyun        {%else%}
34*4882a593Smuzhiyun            All project builds
35*4882a593Smuzhiyun        {%endif%}
36*4882a593Smuzhiyun        <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
37*4882a593Smuzhiyun      </h2>
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun {% if objects.paginator.count == 0 %}
41*4882a593Smuzhiyun  {% if request.GET.filter or request.GET.search %}
42*4882a593Smuzhiyun    <div class="row">
43*4882a593Smuzhiyun      <div class="alert">
44*4882a593Smuzhiyun        <form class="no-results input-append" id="searchform">
45*4882a593Smuzhiyun            <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 %}
46*4882a593Smuzhiyun            <button class="btn" type="submit" value="Search">Search</button>
47*4882a593Smuzhiyun            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
48*4882a593Smuzhiyun        </form>
49*4882a593Smuzhiyun      </div>
50*4882a593Smuzhiyun    </div>
51*4882a593Smuzhiyun  {% else %}
52*4882a593Smuzhiyun    <div class="alert alert-info">
53*4882a593Smuzhiyun      <p class="lead">
54*4882a593Smuzhiyun        This project has no builds.
55*4882a593Smuzhiyun      </p>
56*4882a593Smuzhiyun    </div>
57*4882a593Smuzhiyun  {% endif %}
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun {% else %}
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun  {% include "basetable_top.html" %}
62*4882a593Smuzhiyun        <!-- 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*4882a593Smuzhiyun        {% for build in objects %} {# if we have a build, just display it #}
64*4882a593Smuzhiyun        <tr class="data">
65*4882a593Smuzhiyun            <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>
66*4882a593Smuzhiyun              {% if build.cooker_log_path %}
67*4882a593Smuzhiyun                &nbsp;
68*4882a593Smuzhiyun                <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
69*4882a593Smuzhiyun                  <i class="icon-download-alt" title="Download build log"></i>
70*4882a593Smuzhiyun                </a>
71*4882a593Smuzhiyun              {% endif %}
72*4882a593Smuzhiyun            </td>
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun            <td class="target">
75*4882a593Smuzhiyun                {% for t in build.target_set.all %}
76*4882a593Smuzhiyun                    <a href="{% url "builddashboard" build.id %}">
77*4882a593Smuzhiyun                        {% if t.task %}
78*4882a593Smuzhiyun                            {{t.target}}:{{t.task}}
79*4882a593Smuzhiyun                        {% else %}
80*4882a593Smuzhiyun                            {{t.target}}
81*4882a593Smuzhiyun                        {% endif %}
82*4882a593Smuzhiyun                    </a> <br />
83*4882a593Smuzhiyun                {% endfor %}
84*4882a593Smuzhiyun            </td>
85*4882a593Smuzhiyun            <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
86*4882a593Smuzhiyun            <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
87*4882a593Smuzhiyun            <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
88*4882a593Smuzhiyun            <td class="failed_tasks error">
89*4882a593Smuzhiyun                {% query build.task_build outcome=4 order__gt=0 as exectask%}
90*4882a593Smuzhiyun                    {% if exectask.count == 1 %}
91*4882a593Smuzhiyun                        <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
92*4882a593Smuzhiyun                        <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
93*4882a593Smuzhiyun                            <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
94*4882a593Smuzhiyun                        </a>
95*4882a593Smuzhiyun                    {% elif exectask.count > 1%}
96*4882a593Smuzhiyun                        <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
97*4882a593Smuzhiyun                    {%endif%}
98*4882a593Smuzhiyun            </td>
99*4882a593Smuzhiyun            <td class="errors.count">
100*4882a593Smuzhiyun                {% if  build.errors.count %}
101*4882a593Smuzhiyun                    <a class="errors.count error" href="{% url "builddashboard" build.id %}#errors">{{build.errors.count}} error{{build.errors.count|pluralize}}</a>
102*4882a593Smuzhiyun                {%endif%}
103*4882a593Smuzhiyun            </td>
104*4882a593Smuzhiyun            <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*4882a593Smuzhiyun            <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent_seconds|sectohms}}</a></td>
106*4882a593Smuzhiyun            <td class="output">
107*4882a593Smuzhiyun              {% if build.outcome == build.SUCCEEDED %}
108*4882a593Smuzhiyun              <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
109*4882a593Smuzhiyun              {% endif %}
110*4882a593Smuzhiyun            </td>
111*4882a593Smuzhiyun        </tr>
112*4882a593Smuzhiyun        {% endfor %}
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun
115*4882a593Smuzhiyun  {% include "basetable_bottom.html" %}
116*4882a593Smuzhiyun{% endif %}
117*4882a593Smuzhiyun
118*4882a593Smuzhiyun{% endblock %}
119