summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/build.html
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/build.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/build.html140
1 files changed, 140 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html
new file mode 100644
index 0000000..faabd22
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/build.html
@@ -0,0 +1,140 @@
1{% extends "base.html" %}
2
3{% load static %}
4{% load projecttags %}
5{% load humanize %}
6
7{% block pagecontent %}
8<div class="row-fluid">
9 {% if not objects.paginator.count and not request.GET.filter and not request.GET.search %}
10 <!-- Empty - no data in database -->
11 <div class="hero-unit span12">
12 <button type="button" class="close" data-dismiss="alert">&times;</button>
13 <div class="row-fluid">
14 <div class="span6">
15 <h1>This is Toaster</h1>
16 <p>A web interface to <a href="http://www.yoctoproject.org/tools-resources/projects/bitbake">BitBake</a>, the <a href="http://www.yoctoproject.org">Yocto Project</a> build system.</p>
17 <p class="hero-actions">
18 <a class="btn btn-primary btn-large" href="https://www.yoctoproject.org/documentation/toaster-manual">Show me the manual</a>
19 <a class="btn btn-large" href="https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster">I want to contribute</a>
20 </p>
21 </div>
22 <div class="span5">
23 <a href="http://www.yoctoproject.org"><img src="{% static 'img/toaster.png' %}" class="thumbnail" alt="Yocto Project"/> </a>
24 </div>
25 </div>
26 </div>
27 {% endif %}
28
29 {%if mru.count > 0%}
30 <div class="page-header top-air">
31 <h1>
32 Recent Builds
33 </h1>
34 </div>
35 {% for build in mru %}
36 <div class="alert {%if build.outcome == build.SUCCEEDED%}alert-success{%elif build.outcome == build.FAILED%}alert-error{%else%}alert-info{%endif%}">
37 <div class="row-fluid">
38 <div class="lead span5">
39 {%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%}
40 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
41 <a href="{%url 'builddashboard' build.pk%}" class="{%if build.outcome == build.SUCCEEDED %}success{%else%}error{%endif%}">
42 {% endif %}
43 <span data-toggle="tooltip" {%if build.target_set.all.count > 1%}title="Targets: {%for target in build.target_set.all%}{{target.target}} {%endfor%}"{%endif%}>{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|naturaltime}})</span>
44 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
45 </a>
46 {% endif %}
47 </div>
48 {%if build.outcome == build.SUCCEEDED or build.outcome == build.FAILED %}
49 <div class="span2 lead">
50 {% if build.errors_no %}
51 <i class="icon-minus-sign red"></i> <a href="{%url 'builddashboard' build.pk%}#errors" class="error">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>
52 {% endif %}
53 </div>
54 <div class="span2 lead">
55 {% if build.warnings_no %}
56 <i class="icon-warning-sign yellow"></i> <a href="{%url 'builddashboard' build.pk%}#warnings" class="warning">{{build.warnings_no}} warning{{build.warnings_no|pluralize}}</a>
57 {% endif %}
58 </div>
59 <div class="lead pull-right">
60 Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a>
61 </div>
62 {%endif%}{%if build.outcome == build.IN_PROGRESS %}
63 <div class="span4">
64 <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
65 <div style="width: {{build.completeper}}%;" class="bar"></div>
66 </div>
67 </div>
68 <div class="lead pull-right">ETA: in {{build.eta|naturaltime}}</div>
69 {%endif%}
70 </div>
71 </div>
72
73 {% endfor %}{%endif%}
74
75 {% if not objects.paginator.count and not request.GET.filter and not request.GET.search %}
76 <!-- Empty - no data in database -->
77 {% if mru.count == 0 %}
78 <div class="page-header top-air">
79 <h1>All builds</h1>
80 </div>
81 <div class="alert alert-info lead">
82 Toaster has not recorded any builds yet. Go build something with <a href="http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#test-run">Knotty</a> or <a href="https://www.yoctoproject.org/documentation/hob-manual">Hob</a>
83 </div>
84 {% endif %}
85 {% else %}
86 <div class="page-header top-air">
87 <h1>
88 {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
89 {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
90 {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
91 No builds found
92 {%else%}
93 All builds
94 {%endif%}
95 </h1>
96 </div>
97
98 {% if objects.paginator.count == 0 %}
99 <div class="row-fluid">
100 <div class="alert">
101 <form class="no-results input-append" id="searchform">
102 <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 %}
103 <button class="btn" type="submit" value="Search">Search</button>
104 <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
105 </form>
106 </div>
107 </div>
108
109
110 {% else %}
111 {% include "basetable_top.html" %}
112 <!-- 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 -->
113 {% for build in objects %}
114 <tr class="data">
115 <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>
116 <td class="target">{% for t in build.target_set.all %} <a href="{% url "builddashboard" build.id %}"> {{t.target}} </a> <br />{% endfor %}</td>
117 <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
118 <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
119 <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
120 <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>{% elif exectask.count > 1%}<a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}}</a>{%endif%}</td>
121 <td class="errors_no">{% if build.errors_no %}<a class="errors_no error" href="{% url "builddashboard" build.id %}#errors">{{build.errors_no}} error{{build.errors_no|pluralize}}</a>{%endif%}</td>
122 <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>
123 <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td>
124 <td class="log">{{build.cooker_log_path}}</td>
125 <td class="output">
126 {% if build.outcome == build.SUCCEEDED %}
127 <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
128 {% endif %}
129 </td>
130 </tr>
131
132 {% endfor %}
133
134
135 {% include "basetable_bottom.html" %}
136 {% endif %} {# objects.paginator.count #}
137{% endif %} {# empty #}
138</div><!-- end row-fluid-->
139
140{% endblock %}