diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-01-14 12:46:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-16 08:25:31 +0000 |
commit | 2d78912bc62b7452433e3c785327d542449e3011 (patch) | |
tree | 279414cc98424924973d6aa0d378a3b8396b24f3 /bitbake/lib/toaster/toastergui/templates/managed_builds.html | |
parent | ce784879f48086ba8d33d7589293afbaf94780a0 (diff) | |
download | poky-2d78912bc62b7452433e3c785327d542449e3011.tar.gz |
bitbake: toastergui: all builds page lists failed build requests
This patch modifies the all builds page by splitting the page
into two variants - the "interactive" (default) and "managed" mode
versions.
In the "managed" mode version, we display build requests instead of
builds, including the failed build requests that have no build
associated with them.
[YOCTO #6671]
(Bitbake rev: c5f5fb80308228585aa7ff9721352feb5ed9c961)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/managed_builds.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/managed_builds.html | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/managed_builds.html b/bitbake/lib/toaster/toastergui/templates/managed_builds.html new file mode 100644 index 0000000000..5944dc4747 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/managed_builds.html | |||
@@ -0,0 +1,135 @@ | |||
1 | {% extends "base.html" %} | ||
2 | |||
3 | {% load static %} | ||
4 | {% load projecttags %} | ||
5 | {% load humanize %} | ||
6 | |||
7 | {% block pagecontent %} | ||
8 | <div class="row-fluid"> | ||
9 | |||
10 | {% include "managed_mrb_section.html" %} | ||
11 | |||
12 | |||
13 | {% if 1 %} | ||
14 | <div class="page-header top-air"> | ||
15 | <h1> | ||
16 | {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %} | ||
17 | {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found | ||
18 | {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %} | ||
19 | No builds found | ||
20 | {%else%} | ||
21 | All builds | ||
22 | {%endif%} | ||
23 | </h1> | ||
24 | </div> | ||
25 | |||
26 | {% if objects.paginator.count == 0 %} | ||
27 | <div class="row-fluid"> | ||
28 | <div class="alert"> | ||
29 | <form class="no-results input-append" id="searchform"> | ||
30 | <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 %} | ||
31 | <button class="btn" type="submit" value="Search">Search</button> | ||
32 | <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button> | ||
33 | </form> | ||
34 | </div> | ||
35 | </div> | ||
36 | |||
37 | |||
38 | {% else %} | ||
39 | {% include "basetable_top_buildprojects.html" %} | ||
40 | <!-- 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 --> | ||
41 | {% for br in objects %}{% if br.build %} {% with build=br.build %} {# if we have a build, just display it #} | ||
42 | <tr class="data"> | ||
43 | <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></td> | ||
44 | <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td> | ||
45 | <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td> | ||
46 | <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td> | ||
47 | <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td> | ||
48 | <td class="failed_tasks error"> | ||
49 | {% query build.task_build outcome=4 order__gt=0 as exectask%} | ||
50 | {% if exectask.count == 1 %} | ||
51 | <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a> | ||
52 | {% if MANAGED and build.project %} | ||
53 | <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}"> | ||
54 | <i class="icon-download-alt" title="" data-original-title="Download task log file"></i> | ||
55 | </a> | ||
56 | {% endif %} | ||
57 | {% elif exectask.count > 1%} | ||
58 | <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a> | ||
59 | {%endif%} | ||
60 | </td> | ||
61 | <td class="errors_no"> | ||
62 | {% if build.errors_no %} | ||
63 | <a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a> | ||
64 | {% if MANAGED and build.project %} | ||
65 | <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}"> | ||
66 | <i class="icon-download-alt" title="" data-original-title="Download build log"></i> | ||
67 | </a> | ||
68 | {% endif %} | ||
69 | {%endif%} | ||
70 | </td> | ||
71 | <td class="warnings_no">{% if build.warnings_no %}<a class="warnings_no warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>{%endif%}</td> | ||
72 | <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td> | ||
73 | {% if not MANAGED or not build.project %} | ||
74 | <td class="log">{{build.cooker_log_path}}</td> | ||
75 | {% endif %} | ||
76 | <td class="output"> | ||
77 | {% if build.outcome == build.SUCCEEDED %} | ||
78 | <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a> | ||
79 | {% endif %} | ||
80 | </td> | ||
81 | {% if MANAGED %} | ||
82 | <td class="project"> | ||
83 | {% if build.project %} | ||
84 | <a href="{% url 'project' build.project.id %}">{{build.project.name}}</a> | ||
85 | {% endif %} | ||
86 | </td> | ||
87 | {% endif %} | ||
88 | </tr> | ||
89 | |||
90 | |||
91 | {%endwith%} | ||
92 | {% else %} {# we don't have a build for this build request, mask the data with build request data #} | ||
93 | |||
94 | |||
95 | |||
96 | <tr class="data"> | ||
97 | <td class="outcome">{% if buildrequest.state == buildrequest.REQ_FAILED %}<i class="icon-minus-sign error"></i>{%else%}FIXME_build_request_state{%endif%}</td> | ||
98 | <td class="target"> | ||
99 | <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> | ||
100 | </td> | ||
101 | <td class="machine"> | ||
102 | {{br.machine}} | ||
103 | </td> | ||
104 | <td class="started_on"> | ||
105 | {{br.created|date:"d/m/y H:i"}} | ||
106 | </td> | ||
107 | <td class="completed_on"> | ||
108 | {{br.updated|date:"d/m/y H:i"}} | ||
109 | </td> | ||
110 | <td class="failed_tasks error"> | ||
111 | {{br.brerror_set.all.0.errmsg|whitespace_slice:":32"}} | ||
112 | </td> | ||
113 | <td class="errors_no"> | ||
114 | </td> | ||
115 | <td class="warnings_no"> | ||
116 | </td> | ||
117 | <td class="time"> | ||
118 | {{br.timespent.total_seconds|sectohms}} | ||
119 | </td> | ||
120 | <td class="output"> {# we have no output here #} | ||
121 | </td> | ||
122 | <td class="project"> | ||
123 | <a href="{% url 'project' br.project.id %}">{{br.project.name}}</a> | ||
124 | </td> | ||
125 | </tr> | ||
126 | {%endif%} | ||
127 | {% endfor %} | ||
128 | |||
129 | |||
130 | {% include "basetable_bottom.html" %} | ||
131 | {% endif %} {# objects.paginator.count #} | ||
132 | {% endif %} {# empty #} | ||
133 | </div><!-- end row-fluid--> | ||
134 | |||
135 | {% endblock %} | ||