From 587275eefd744032f00ebdce35134b2ab2bb7572 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Tue, 12 Jul 2016 15:54:50 -0700 Subject: 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 Signed-off-by: bavery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/templates/basebuildpage.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/templates/basebuildpage.html') 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 @@ $("#build-menu li a").each(function(){ /* Set the page active state in the Build menu */ - var currentUrl = window.location.href.split('?')[0]; + var currentUrl = window.location.href.split('?')[0]; if (currentUrl === $(this).prop("href")){ $(this).parent().addClass("active"); } else { @@ -62,11 +62,13 @@ {% endif %} > Build summary - {% if build.target_set.all.0.is_image and build.outcome == 0 %} + {% if build.has_images and build.outcome == build.SUCCEEDED %} {% block nav-target %} {% for t in build.get_sorted_target_list %} -
  • + {% if t.has_images %} +
  • + {% endif %} {% endfor %} {% endblock %} {% endif %} -- cgit v1.2.3-54-g00ecf