diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-03-20 11:44:19 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-25 11:17:32 +0000 |
commit | 604d2c8df30b0139704991703b99ae9039c0f342 (patch) | |
tree | eb5dd547e7b2b64a70adb9d1e9988ee292a17d17 /bitbake/lib/toaster | |
parent | 888ceb12522e19e30759acc67336f010b63ad864 (diff) | |
download | poky-604d2c8df30b0139704991703b99ae9039c0f342.tar.gz |
bitbake: toaster: Revert "added file types to the Outputs column in the build page"
This reverts commit d40ac966b22e1fa1956d8f2fe37fd55fa670e88f.
Sloppy review on my part let the original patch in, when it should've
been rejected because the filter tags should have no knowledge of the
object system.
(Bitbake rev: 7e59b6b1cb44de00c512facece5ede96375a411f)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/build.html | 6 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templatetags/projecttags.py | 27 |
2 files changed, 1 insertions, 32 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/build.html b/bitbake/lib/toaster/toastergui/templates/build.html index 1c94e7c8f9..8f557e9686 100644 --- a/bitbake/lib/toaster/toastergui/templates/build.html +++ b/bitbake/lib/toaster/toastergui/templates/build.html | |||
@@ -92,11 +92,7 @@ | |||
92 | <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> | 92 | <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> |
93 | <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td> | 93 | <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent|sectohms}}</a></td> |
94 | <td class="log">{{build.cooker_log_path}}</td> | 94 | <td class="log">{{build.cooker_log_path}}</td> |
95 | <td class="output"> | 95 | <td class="output">{% if build.outcome == 0 %}{% for t in build.target_set.all %}{% if t.is_image %}<a href="{%url "builddashboard" build.id%}#images">TODO: compute image output fstypes</a>{% endif %}{% endfor %}{% endif %}</td> |
96 | {% if build.outcome == 0 %} | ||
97 | {{build|get_image_extensions}} | ||
98 | {% endif %} | ||
99 | </td> | ||
100 | </tr> | 96 | </tr> |
101 | 97 | ||
102 | {% endfor %} | 98 | {% endfor %} |
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py index e08258b6e7..e7b23cbff2 100644 --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py | |||
@@ -24,8 +24,6 @@ import re | |||
24 | from django import template | 24 | from django import template |
25 | from django.utils import timezone | 25 | from django.utils import timezone |
26 | from django.template.defaultfilters import filesizeformat | 26 | from django.template.defaultfilters import filesizeformat |
27 | from orm.models import Target_Installed_Package, Target_Image_File | ||
28 | from orm.models import Build, Target, Task, Layer, Layer_Version | ||
29 | 27 | ||
30 | register = template.Library() | 28 | register = template.Library() |
31 | 29 | ||
@@ -191,31 +189,6 @@ def string_slice(strvar,slicevar): | |||
191 | return strvar[int(first):int(last)] | 189 | return strvar[int(first):int(last)] |
192 | 190 | ||
193 | @register.filter | 191 | @register.filter |
194 | def get_image_extensions( build ): | ||
195 | """ | ||
196 | This is a simple filter that returns a list (string) | ||
197 | of extensions of the build-targets-image files. Note | ||
198 | that each build can have multiple targets and each | ||
199 | target can yield more than one image file | ||
200 | """ | ||
201 | targets = Target.objects.filter( build_id = build.id ); | ||
202 | comma = ""; | ||
203 | extensions = ""; | ||
204 | for t in targets: | ||
205 | if ( not t.is_image ): | ||
206 | continue; | ||
207 | tif = Target_Image_File.objects.filter( target_id = t.id ); | ||
208 | for i in tif: | ||
209 | try: | ||
210 | ndx = i.file_name.index( "." ); | ||
211 | except ValueError: | ||
212 | ndx = 0; | ||
213 | s = i.file_name[ ndx + 1 : ]; | ||
214 | extensions += comma + s; | ||
215 | comma = ", "; | ||
216 | return( extensions ); | ||
217 | |||
218 | @register.filter | ||
219 | def filtered_installedsize(size, installed_size): | 192 | def filtered_installedsize(size, installed_size): |
220 | """If package.installed_size not null and not empty return it, | 193 | """If package.installed_size not null and not empty return it, |
221 | else return package.size | 194 | else return package.size |