diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-07-12 15:54:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-19 08:56:51 +0100 |
commit | 587275eefd744032f00ebdce35134b2ab2bb7572 (patch) | |
tree | f8f178cdeacf3122df1ab7abd4550fbf8b4374c0 /bitbake/lib/toaster/toastergui/templates | |
parent | 150e5588a01b1334ae3158c9b13e28bec428af37 (diff) | |
download | poky-587275eefd744032f00ebdce35134b2ab2bb7572.tar.gz |
bitbake: toaster: use has_images() methods to display images correctly
In the build dashboard, we had issues with showing images correctly,
as we were using the is_image property of targets to determine
whether a target would have image files. This property can
be set to True if a target refers to an image recipe
(e.g. "core-image-minimal"), even if the task used in the build
didn't produce any image files.
By adding has_images() methods to the Target and Build objects,
which count associated Target_Image_File objects,
we can correctly determine whether a target has image files
associated with it, and if any of the targets for a build has
image files. This means that we can screen out the left-hand
"Images" menu options for builds which contained image-related
targets (e.g. "core-image-minimal") but which didn't produce
any images (e.g. "rootfs" task).
[YOCTO #9500]
[YOCTO #9784]
(Bitbake rev: f6bba0ff254d5ed3163151d4b938f3a43c9acb0a)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/basebuildpage.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html index 856259a69d..e9927ebbaa 100644 --- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html +++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | $("#build-menu li a").each(function(){ | 34 | $("#build-menu li a").each(function(){ |
35 | /* Set the page active state in the Build menu */ | 35 | /* Set the page active state in the Build menu */ |
36 | var currentUrl = window.location.href.split('?')[0]; | 36 | var currentUrl = window.location.href.split('?')[0]; |
37 | if (currentUrl === $(this).prop("href")){ | 37 | if (currentUrl === $(this).prop("href")){ |
38 | $(this).parent().addClass("active"); | 38 | $(this).parent().addClass("active"); |
39 | } else { | 39 | } else { |
@@ -62,11 +62,13 @@ | |||
62 | {% endif %} > | 62 | {% endif %} > |
63 | <a href="{% url 'builddashboard' build.pk %}">Build summary</a> | 63 | <a href="{% url 'builddashboard' build.pk %}">Build summary</a> |
64 | </li> | 64 | </li> |
65 | {% if build.target_set.all.0.is_image and build.outcome == 0 %} | 65 | {% if build.has_images and build.outcome == build.SUCCEEDED %} |
66 | <li class="nav-header">Images</li> | 66 | <li class="nav-header">Images</li> |
67 | {% block nav-target %} | 67 | {% block nav-target %} |
68 | {% for t in build.get_sorted_target_list %} | 68 | {% for t in build.get_sorted_target_list %} |
69 | <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> | 69 | {% if t.has_images %} |
70 | <li id="menu-{{t.target}}"><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li> | ||
71 | {% endif %} | ||
70 | {% endfor %} | 72 | {% endfor %} |
71 | {% endblock %} | 73 | {% endblock %} |
72 | {% endif %} | 74 | {% endif %} |