mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
bitbake: toaster: Add recipe details page
This page provides the details of recipes, showing their packages and additional metadata. It also allows you to build the recipe or customise the recipe if it is an image recipe. [YOCTO #8070] (Bitbake rev: b6023619397f679791b7eff1faac06f4246133ce) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5f52614a87
commit
ce7289613b
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
function recipeDetailsPageInit(ctx){
|
||||
|
||||
$(".customise-btn").click(function(e){
|
||||
e.preventDefault();
|
||||
var imgCustomModal = $("#new-custom-image-modal");
|
||||
|
||||
if (imgCustomModal.length === 0)
|
||||
throw("Modal new-custom-image not found");
|
||||
|
||||
imgCustomModal.data('recipe', $(this).data('recipe'));
|
||||
imgCustomModal.modal('show');
|
||||
});
|
||||
|
||||
$("#add-layer-btn").click(function(){
|
||||
var btn = $(this);
|
||||
|
||||
libtoaster.addRmLayer(ctx.recipe.layer_version,
|
||||
true,
|
||||
function (layersList){
|
||||
var msg = libtoaster.makeLayerAddRmAlertMsg(ctx.recipe.layer_version,
|
||||
layersList,
|
||||
true);
|
||||
|
||||
libtoaster.showChangeNotification(msg);
|
||||
|
||||
var toShow = $("#customise-build-btns");
|
||||
|
||||
/* If we have no packages built yet also fade in the build packages
|
||||
* hint message
|
||||
*/
|
||||
if (ctx.recipe.totalPackages === 0){
|
||||
toShow = toShow.add("#build-to-get-packages-msg");
|
||||
}
|
||||
|
||||
$("#packages-alert").add(btn).fadeOut(function(){
|
||||
toShow.fadeIn();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/* Trigger a build of your custom image */
|
||||
$(".build-recipe-btn").click(function(){
|
||||
libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl,
|
||||
libtoaster.ctx.projectId,
|
||||
ctx.recipe.name,
|
||||
function(){
|
||||
window.location.replace(libtoaster.ctx.projectBuildsUrl);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user