Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id BEED9E00BE9; Wed, 16 Mar 2016 10:30:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [147.11.146.13 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D6A36E00B9E for ; Wed, 16 Mar 2016 10:30:25 -0700 (PDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id u2GHUNSQ028719 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 16 Mar 2016 10:30:23 -0700 (PDT) Received: from ord-dlerner-d8.wrs.com (172.25.44.108) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.248.2; Wed, 16 Mar 2016 10:30:22 -0700 From: Dave Lerner To: , , Date: Wed, 16 Mar 2016 12:29:03 -0500 Message-ID: <1458149343-4708-2-git-send-email-dave.lerner@windriver.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458149343-4708-1-git-send-email-dave.lerner@windriver.com> References: <1458149343-4708-1-git-send-email-dave.lerner@windriver.com> MIME-Version: 1.0 Subject: [PATCH 1/1] toaster: fixes for customimage package not found X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2016 17:30:31 -0000 Content-Type: text/plain For a custom image, if a search for a package results in no packages found, then additional information should be presented to the user. This is different than a 'no results' found for a search in other contexts, for example, a search for a package in a non-customised build. For a custom image, a package search failure can happen because the package was not added to the custom image. This commit presents more information to the user, suggesting why the package was not found in the custom image. The generic table view handling js changes to handle a new div element no-results-special-... such that, if present, that template section is shown rather than the default no-results-... section. [YOCTO #9154] Signed-off-by: Dave Lerner --- .../toaster/toastergui/static/js/customrecipe.js | 9 +++++++++ bitbake/lib/toaster/toastergui/static/js/table.js | 11 +++++++++-- .../toaster/toastergui/templates/customrecipe.html | 22 ++++++++++++---------- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/customrecipe.js b/bitbake/lib/toaster/toastergui/static/js/customrecipe.js index 3c57899..dbed011 100644 --- a/bitbake/lib/toaster/toastergui/static/js/customrecipe.js +++ b/bitbake/lib/toaster/toastergui/static/js/customrecipe.js @@ -205,6 +205,15 @@ function customRecipePageInit(ctx) { }); } + $("#no-results-show-all-packages").click(function(){ + $(".no-results-search-input").val(""); + }); + + $("#no-results-remove-search-btn").click(function(){ + $(".no-results-search-input").val(""); + $(this).hide(); + }); + /* Trigger a build of your custom image */ $(".build-custom-image").click(function(){ libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl, diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index a7e4fba..2ae7695 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -75,8 +75,15 @@ function tableInit(ctx){ if (tableData.total === 0){ tableContainer.hide(); - $("#new-search-input-"+ctx.tableName).val(tableParams.search); - $("#no-results-"+ctx.tableName).show(); + if ($("#no-results-special-"+ctx.tableName).length > 0) { + /* use this page's special no-results form instead of the default */ + $("#no-results-search-input-"+ctx.tableName).val(tableParams.search); + $("#no-results-special-"+ctx.tableName).show(); + $("#results-found-"+ctx.tableName).hide(); + } else { + $("#new-search-input-"+ctx.tableName).val(tableParams.search); + $("#no-results-"+ctx.tableName).show(); + } table.trigger("table-done", [tableData.total, tableParams]); return; diff --git a/bitbake/lib/toaster/toastergui/templates/customrecipe.html b/bitbake/lib/toaster/toastergui/templates/customrecipe.html index 8cce919..35209bf 100644 --- a/bitbake/lib/toaster/toastergui/templates/customrecipe.html +++ b/bitbake/lib/toaster/toastergui/templates/customrecipe.html @@ -102,25 +102,26 @@ Download recipe file - +
{% if recipe.get_all_packages.count == 0 and last_build == None %}

Add | Remove packages

@@ -135,6 +136,7 @@ {% include "toastertable.html" %} {% endif %}
+

About {{recipe.name}}

-- 1.9.1