summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
blob: ac87d8c166c56579327084d9853891e3e78c260b (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
{% extends "baseprojectpage.html" %}
{% load projecttags %}
{% load humanize %}

{% block localbreadcrumb %}
<li>Project builds</li>
{% endblock %}

{% block extraheadcontent %}
<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
<link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'>
<script src="/static/js/jquery-ui.min.js"></script>
<script src="/static/js/filtersnippet.js"></script>
{% endblock %}

{% block projectinfomain %}

<script>
    // initialize the date range controls
    $(document).ready(function () {
        date_init('created','{{last_date_from}}','{{last_date_to}}','{{dateMin_created}}','{{dateMax_created}}','{{daterange_selected}}');
        date_init('updated','{{last_date_from}}','{{last_date_to}}','{{dateMin_updated}}','{{dateMax_updated}}','{{daterange_selected}}');
    });
</script>

    <div class="page-header">
      <h1>
        {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
            {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
        {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
            No builds found
        {%else%}
            All builds
        {%endif%}
        <i class="icon-question-sign get-help heading-help" title="This page lists all the builds for the current project"></i>
      </h1>
    </div>


 {% if objects.paginator.count == 0 %}
  {% if request.GET.filter or request.GET.search %}
    <div class="row-fluid">
      <div class="alert">
        <form class="no-results input-append" id="searchform">
            <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="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
            <button class="btn" type="submit" value="Search">Search</button>
            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
        </form>
      </div>
    </div>
  {% else %}
    <div class="alert alert-info">
      <p class="lead">
        This project has no builds.
      </p>
    </div>
  {% endif %}

 {% else %}

  {% include "basetable_top.html" %}
        <!-- 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 -->
        {% for br in objects %}{% if br.build %}  {% with build=br.build %} {# if we have a build, just display it #}
        <tr class="data">
            <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>
                   {% if build.project %}
                        &nbsp; <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
                            <i class="icon-download-alt" title="" data-original-title="Download build log"></i>
                        </a>
                    {% endif %}
            </td>

            <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
            <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
            <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
            <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
            <td class="failed_tasks error">
                {% query build.task_build outcome=4 order__gt=0 as exectask%}
                    {% if exectask.count == 1 %}
                        <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
                        <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
                            <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
                        </a>
                    {% elif exectask.count > 1%}
                        <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
                    {%endif%}
            </td>
            <td class="errors.count">
                {% if  build.errors.count %}
                    <a class="errors.count error" href="{% url "builddashboard" build.id %}#errors">{{build.errors.count}} error{{build.errors.count|pluralize}}</a>
                {%endif%}
            </td>
            <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>
            <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent_seconds|sectohms}}</a></td>
            <td class="output">
              {% if build.outcome == build.SUCCEEDED %}
              <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
              {% endif %}
            </td>
        </tr>

              {%endwith%}
      {% else %} {# we don't have a build for this build request, mask the data with build request data #}



        <tr class="data">
            <td class="outcome">{% if br.state == br.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td>
            <td class="target">
                <a href="{% url "builddashboard" br.id %}"><span data-toggle="tooltip" {%if br.brtarget_set.all.count > 1%}title="Targets: {%for target in br.brtarget_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{br.brtarget_set.all.0.target}} {%if br.brtarget_set.all.count > 1%}(+ {{br.brtarget_set.all.count|add:"-1"}}){%endif%} </span></a>
            </td>
            <td class="machine">
                <a href="{% url "builddashboard" br.id %}">{{br.machine}}</a>
            </td>
            <td class="started_on">
                <a href="{% url "builddashboard" br.id %}">{{br.created|date:"d/m/y H:i"}}</a>
            </td>
            <td class="completed_on">
                <a href="{% url "builddashboard" br.id %}">{{br.updated|date:"d/m/y H:i"}}</a>
            </td>
            <td class="failed_tasks error">
            </td>
            <td class="errors.count">
        <a class="errors.count error" href="{% url "builddashboard" br.id %}#errors">{{br.brerror_set.all.count}} error{{br.brerror_set.all.count|pluralize}}</a>
            </td>
            <td class="warnings.count">
            </td>
            <td class="time">
                {{br.timespent.total_seconds|sectohms}}
            </td>
            <td class="output"> {# we have no output here #}
            </td>
        </tr>
          {%endif%}
        {% endfor %}


  {% include "basetable_bottom.html" %}
{% endif %}

{% endblock %}