summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/task.html
diff options
context:
space:
mode:
authorRavi Chintakunta <ravi.chintakunta@timesys.com>2014-02-17 23:30:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 12:24:00 -0700
commit31d4bf8484ee42690386c6b7a6bd6c7a2be54464 (patch)
treeb9ef1f8c22dc51445c9ba6a35f05e091262a47b2 /bitbake/lib/toaster/toastergui/templates/task.html
parent2bd19cd02623b7c5494c2f7057587252a75746c9 (diff)
downloadpoky-31d4bf8484ee42690386c6b7a6bd6c7a2be54464.tar.gz
bitbake: toaster: View detailed information about a task
Information about a task is displayed depending on it's execution status and outcome status. Edited to iterate through all possible entries for related setscene tasks. [YOCTO #4282] (Bitbake rev: 62f502b1237d4060df6be1ee4f4865db5fa39a6a) Signed-off-by: Ravi Chintakunta <ravi.chintakunta@timesys.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> 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/task.html')
-rw-r--r--bitbake/lib/toaster/toastergui/templates/task.html263
1 files changed, 263 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/task.html b/bitbake/lib/toaster/toastergui/templates/task.html
new file mode 100644
index 0000000000..c5d6176b62
--- /dev/null
+++ b/bitbake/lib/toaster/toastergui/templates/task.html
@@ -0,0 +1,263 @@
1{% extends "basebuilddetailpage.html" %}
2
3{% load projecttags %}
4{% load humanize %}
5
6{% block localbreadcrumb %}
7<li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
8<li>{{task.recipe.name}}_{{task.recipe.version}} {{task.task_name}}</li>
9{% endblock %}
10
11{% block pagedetailinfomain %}
12
13<div class="row span11">
14 <div class="page-header">
15 <h1><a href="{%url 'recipe' build.pk task.recipe.pk %}">{{task.recipe.name}}_{{task.recipe.version}}</a> {{task.task_name}}</h1>
16 </div>
17
18{# Outcome section #}
19<h2 {{ task|task_color:True }}>
20 {{task.get_outcome_display}}
21 <i class="icon-question-sign get-help heading-help" title="" data-original-title="{{task.outcome_help}}"></i>
22</h2>
23{%if task.task_executed %}
24 {# executed tasks outcome #}
25 <dl class="dl-horizontal">
26 <dt>
27 <i class="icon-question-sign get-help" title="" data-original-title="The location in disk of the task log file"></i> Log file
28 </dt>
29 <dd>
30 <code>{{task.logfile}}</code>
31 </dd>
32 {# show stack trace for failed task #}
33 {% if task.outcome == task.OUTCOME_FAILED and log_head %}
34 <h3>Python stack trace</h3>
35 <div>
36 <pre style="min-height:160px;">
37 <code>{{log_head}}</code><a id="full-trace-show" data-target="#fulltrace" data-toggle="collapse" class="btn btn-mini">...</a>
38 <div id="fulltrace" class="collapse" style="margin-top: -20px; height: 0px;">
39 <code>{{log_body}}</code><br><a id="full-trace-hide" class="btn btn-mini collapsed" style="font-family:Helvetica Neue" data-target="#fulltrace" data-toggle="collapse">Collapse stack trace<i class="icon-caret-up"></i></a></div></pre>
40 </div>
41 {% endif %}
42 </dl>
43{% else %}
44{# not executed tasks outcome #}
45 {% if task.outcome == task.OUTCOME_PREBUILT %}
46 {% if not showing_matches %}
47 <a class="btn" href="javascript:reload_params({'show_matches' : 'true' })">Match to tasks in previous builds <i class="icon-question-sign get-help" style="margin-top:20px;" data-toggle="tooltip" title="This will show you a list of tasks from previous builds with the same inputs signature as this prebuilt task. Any of them could be the task that generated the output this prebuilt task is reusing"></i></a>
48 {% elif matching_tasks %}
49 <h3 class="details">Prebuilt task could be based on
50 <i class="icon-question-sign get-help heading-help" title="" data-toggle="tooltip" data-original-title="This table shows a list of tasks from previous builds with the same inputs signature as the prebuilt task. Any of them could be the task that generated the output the prebuilt task is reusing"></i>
51 </h3>
52 <table class="table table-bordered table-hover">
53 <thead>
54 <th>
55 <i class="icon-question-sign get-help" title="The name of the recipe to which each task applies"></i>
56 Recipe
57 </th>
58 <th>
59 <i class="icon-question-sign get-help" title="The name of the task"></i>
60 Task
61 </th>
62 <th>
63 <i class="icon-question-sign get-help" title="This value tells you if a task had to run in order to generate the task output (executed), or if the output was provided by another task and therefore the task didn't need to run (not executed)"></i>
64 Executed
65 </th>
66 <th>
67 <i class="icon-question-sign get-help" title="This column tells you if executed tasks succeeded, failed or reused output from the sstate-cache directory or mirrors. It also tells you why not executed tasks did not need to run"></i>
68 Outcome
69 </th>
70 <th>
71 <i class="icon-question-sign get-help" title="The date and time the build finished"></i>
72 Build completed on
73 </th>
74 </thead>
75 <tbody>
76 {% for match in matching_tasks %}
77 <tr>
78 <td>
79 <a href="{%url "task" match.build.pk match.pk%}">{{match.recipe.name}}</a>
80 </td>
81 <td>
82 <a href="{%url "task" match.build.pk match.pk%}">{{match.task_name}}</a>
83 </td>
84 <td>
85 <a href="{%url "task" match.build.pk match.pk%}">{{match.get_executed_display}}</a>
86 </td>
87 <td>
88 <a href="{%url "task" match.build.pk match.pk%}">{{match.get_outcome_display}}</a><i class="icon-question-sign get-help hover-help" title="" style="visibility: hidden;" data-original-title="{{match.outcome_help}}"></i>
89 </td>
90 <td>
91 <a href="{%url "task" match.build.pk match.pk%}">{{match.build.completed_on|date:"d/m/y H:i"}}</a>
92 </td>
93 </tr>
94 {% endfor %}
95 </tbody>
96 </table>
97 {% else %}
98 <p class="alert">
99 We have found no tasks matching this prebuilt task.<br/>
100 The task you are looking for could belong to a build for which Toaster has not data.
101 </p>
102 {% endif %}
103 {% elif task.outcome == task.OUTCOME_COVERED %}
104 <dl class="dl-horizontal">
105 <dt>
106 <i class="icon-question-sign get-help" title="" data-toggle="tooltip" data-original-title="The task providing the outcome of this task"></i>Task covered by
107 </dt>
108 <dd>
109 <ul>
110 <li><p class="alert-info">TODO:Covering tasks will be displayed here</p></li>
111 </ul>
112 </dd>
113 </dl>
114 {%elif task.outcome == task.OUTCOME_CACHED%}
115 <dl class="dl-horizontal">
116 <dt>
117 <i class="icon-question-sign get-help" title="" data-original-title="The location in disk of the task log file"></i> Log file
118 </dt>
119 <dd>
120 <code>{% for t in task.get_related_setscene %} {{t.logfile}}<br/>{% endfor %}
121 </code>
122 </dd>
123 </dl>
124 {% endif %}
125{% endif %}
126
127{# Execution section #}
128<h2 {{task|task_color}}>
129 {% if task.task_executed %}
130 Executed
131 <i class="icon-question-sign get-help heading-help" title="" data-original-title="Executed tasks are those that need to run in order to generate the task output"></i>
132 {% else %}
133 Not Executed
134 <i class="icon-question-sign get-help heading-help" title="" data-original-title="Not executed tasks don't need to run because their outcome is provided by another task"></i>
135 {% endif %}
136</h2>
137<dl class="dl-horizontal">
138 <dt>
139 <i class="icon-question-sign get-help" title="To make builds more efficient, the build system detects changes in the 'inputs' to a given task by creating a 'task signature'. If the signature changes, the build system assumes the inputs have changed and the task needs to be rerun"></i>
140 Task inputs signature
141 </dt>
142 <dd>
143 {{task.sstate_checksum}}
144 </dd>
145</dl>
146 {% if task.sstate_result != task.SSTATE_NA %}
147 <div class="alert alert-info">Attempting to restore output from sstate cache
148 <i class="icon-question-sign get-help get-help-blue" title="The build system is searching for the task output in your <code>sstate-cache</code> directory and mirrors. If it finds it, it will use it instead of building it from scratch by running the real task. This makes the build faster"></i>
149 </div>
150 <dl class="dl-horizontal">
151 <dt>
152 <i class="icon-question-sign get-help" title="The name of the file searched for in your <code>sstate-cache</code> directory and mirrors"></i>
153 File searched for
154 </dt>
155 <dd><code>{{task.path_to_sstate_obj}}</code></dd>
156 <dt>
157 <i class="icon-question-sign get-help" title="The locations where the above file was searched: your <code>sstate-cache</code> directory and the mirrors you have set up (if any)"></i>
158 URI(s) searched
159 </dt>
160 <dd><code>{{task.work_directory}}</code></dd>
161 </dl>
162 {% endif %}
163 {% if task.sstate_result == task.SSTATE_MISS %}
164 <div class="alert alert-info">
165 <strong>File not in sstate cache.</strong> Running the real task instead.
166 </div>
167 {% elif task.sstate_result == task.SSTATE_FAILED%}
168 <div class="alert">
169 <strong>Failed</strong> to restore output from sstate cache. The file was found but could not be unpacked.
170 </div>
171 <dl class="dl-horizontal">
172 <dt>
173 <i class="icon-question-sign get-help" title="The location in disk of the cache attempt log file"></i>
174 Log file
175 </dt>
176 <dd><code>{{task.logfile}}</code></dd>
177 <dt>
178 <i class="icon-question-sign get-help" title="How long it took the cache attempt to finish, expressed in seconds"></i>
179 Time (secs)
180 </dt>
181 <dd>{{task.elapsed_time|format_none_and_zero}}</dd>
182 </dl>
183 <div class="alert alert-info">
184 Running the real task instead.
185 </div>
186 {% elif task.sstate_result == task.SSTATE_RESTORED %}
187 <div class="alert alert-info">
188 Output successfully restored from sstate cache.
189 </div>
190 {% endif %}
191 <dl class="dl-horizontal">
192 <dt>
193 <i class="icon-question-sign get-help" title="The running sequence of each task in the build"></i>
194 Task order
195 </dt>
196 <dd><a href="{%url "tasks" build.pk %}#{{task.order}}">{{task.order}}</a></dd>
197 {% if task.task_executed %}
198 <dt>
199 <i class="icon-question-sign get-help" title="If this task executes a Python or Shell function(s)"></i>
200 Task script type
201 </dt>
202 <dd>{{task.get_script_type_display}}</dd>
203 {% endif %}
204<!--
205 <dt>
206 <i class="icon-question-sign get-help" title="The code executed by the task"></i>
207 Task executable output
208 </dt>
209 <dd><code>{{task.source_url}}</code></dd>
210-->
211 <dt>
212 <i class="icon-question-sign get-help" title="Task dependency chain (other tasks)"></i>
213 Task depends on
214 </dt>
215 <dd>
216 <ul>
217 {% for dep in deps %}
218 <li><a href="{%url 'task' dep.build.pk dep.pk%}" class="task-info" title="{{dep.get_executed_display}} | {{dep.get_outcome_display}}">{{dep.recipe.name}}_{{dep.recipe.version}} <span class="task-name">{{dep.task_name}}</span></a></li>
219 {% empty %}
220 <li><p class="alert-info">This task has no dependencies</p></li>
221 {% endfor %}
222 </ul>
223 </dd>
224 <dt>
225 <i class="icon-question-sign get-help" title="Which other tasks depend on this task"></i>
226 Task reverse dependencies
227 </dt>
228 <dd>
229 <ul>
230 {% for dep in rdeps %}
231 <li><a href="{%url 'task' dep.build.pk dep.pk%}" class="task-info" title="{{dep.get_executed_display}} | {{dep.get_outcome_display}}">{{dep.recipe.name}}_{{dep.recipe.version}} <span class="task-name">{{dep.task_name}}</span></a></li>
232 {% empty %}
233 <li><p class="alert-info">This task has no reverse dependencies</p></li>
234 {% endfor %}
235 </ul>
236</dl>
237
238{# Performance section - shown only for executed tasks #}
239{%if task.task_executed %}
240 <h2 class="details">Performance</h2>
241 <dl class="dl-horizontal">
242 <dt>
243 <i class="icon-question-sign get-help" title="How long it took the task to finish, expressed in seconds"></i>
244 Time (secs)
245 </dt>
246 <dd>{{task.elapsed_time|format_none_and_zero}}</dd>
247 <dt>
248 <i class="icon-question-sign get-help" title="Task CPU utilisation, expressed as a percentage"></i>
249 CPU usage
250 </dt>
251 <dd>{{task.cpu_usage|format_none_and_zero}}</dd>
252 <dt>
253 <i class="icon-question-sign get-help" title="Number of miliseconds the task spent doing disk input and output"></i>
254 Disk I/O (ms)
255 </dt>
256 <dd>{{task.disk_io|format_none_and_zero}}</dd>
257 </dl>
258{%endif%}
259
260
261</div>
262{% endblock %}
263