Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 934B0E00C3B; Fri, 18 Mar 2016 11:15:54 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.20 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B5341E00BFD for ; Fri, 18 Mar 2016 11:15:52 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 18 Mar 2016 11:15:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,356,1455004800"; d="scan'208";a="914122617" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 18 Mar 2016 11:15:51 -0700 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.174]) by IRSMSX101.ger.corp.intel.com ([169.254.1.157]) with mapi id 14.03.0248.002; Fri, 18 Mar 2016 18:15:48 +0000 From: "Barros Pena, Belen" To: "Lerner, David M (Wind River)" , "toaster@yoctoproject.org" , "belen.barros.pena@linux.intel.com" , "Smith, Elliot" Thread-Topic: [Toaster] [PATCH 1/1] toaster: fixes for customimage package not found Thread-Index: AQHRgUIyuDmeJnP9pUeLTgSHDAPOXQ== Date: Fri, 18 Mar 2016 18:15:48 +0000 Message-ID: References: <1458149343-4708-1-git-send-email-dave.lerner@windriver.com> <1458149343-4708-2-git-send-email-dave.lerner@windriver.com> In-Reply-To: <1458149343-4708-2-git-send-email-dave.lerner@windriver.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.6.1.160122 x-originating-ip: [10.237.224.32] MIME-Version: 1.0 Subject: Re: [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: Fri, 18 Mar 2016 18:15:54 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <531002BF4746E5439713F41472A70C19@intel.com> Content-Transfer-Encoding: quoted-printable On 16/03/2016 17:29, "toaster-bounces@yoctoproject.org on behalf of Dave Lerner" wrote: >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] This looks good to me. Thanks! Bel=E9n > >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) { > }); > } >=20 >+ $("#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){ >=20 > if (tableData.total =3D=3D=3D 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 */ >+ =20 >$("#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]); >=20 > 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 > > >-
>+
style=3D"display:none;"> >
>

No packages found

>-

You might consider href=3D"all-software-recipes.html">searching the list of recipes >instead. If you find a recipe that matches the name of the package you >want:

>+

You might consider project.id %}>searching the list of recipes instead. If you find a >recipe that matches the name of the package you want:

>
    >
  1. Add the layer providing the recipe to your project
  2. >
  3. Build the recipe
  4. >
  5. Once the build completes, come back to this page and >search for the package
  6. >
>
>- >- >- >- >- >- >-
>-
>+ no-results-search-input" id=3D"no-results-search-input-{{table_name}}" >name=3D"search" placeholder=3D"Search {{title|lower}}" /> >+ id=3D"no-results-remove-search-btn" tabindex=3D"-1"> >+ >+ >+ >+ >+ >+
>
>+
>
> {% if recipe.get_all_packages.count =3D=3D 0 and last_build =3D= =3D None >%} >

Add | Remove packages

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

About {{recipe.name}}

>--=20 >1.9.1 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster