mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
bitbake: toastergui: layerBtn Fix build trigger mechanism
The new project page is no longer responsible for triggering the build so add a handler for this in layerBtn which is used in the layerdetails and layers pages. This also removes the conflicting and redundant handler for this in the layerdetails. (Bitbake rev: b4c389443bdd121121fd1d1a9006a9f1f63f186f) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a65099eec3
commit
58197f345b
@@ -55,6 +55,19 @@ function layerBtnsInit(ctx) {
|
||||
});
|
||||
});
|
||||
|
||||
$(".build-recipe-btn").unbind('click');
|
||||
$(".build-recipe-btn").click(function(e){
|
||||
e.preventDefault();
|
||||
var recipe = $(this).data('recipe-name');
|
||||
|
||||
libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl,
|
||||
libtoaster.ctx.projectId, recipe,
|
||||
function(){
|
||||
/* Success */
|
||||
window.location.replace(libtoaster.ctx.projectBuildsUrl);
|
||||
});
|
||||
});
|
||||
|
||||
/* Setup the initial state of the buttons */
|
||||
|
||||
for (var i in ctx.projectLayers){
|
||||
|
||||
@@ -179,14 +179,6 @@ function layerDetailsPageInit (ctx) {
|
||||
/* re run the machinesTabShow to update the text */
|
||||
targetsTabShow();
|
||||
}
|
||||
|
||||
$(".build-target-btn").unbind('click');
|
||||
$(".build-target-btn").click(function(){
|
||||
/* fire a build */
|
||||
var target = $(this).data('target-name');
|
||||
libtoaster.startABuild(ctx.projectBuildsUrl, libtoaster.ctx.projectId, target, null, null);
|
||||
window.location.replace(libtoaster.ctx.projectPageUrl);
|
||||
});
|
||||
});
|
||||
|
||||
$("#machinestable").on('table-done', function(e, total, tableParams){
|
||||
|
||||
@@ -438,7 +438,7 @@ class LayerRecipesTable(RecipesTable):
|
||||
field_name="get_description_or_summary")
|
||||
|
||||
|
||||
build_recipe_template ='<button class="btn btn-block build-target-btn" data-target-name="{{data.name}}" {%if extra.in_prj == 0 %}disabled="disabled"{%endif%}>Build recipe</button>'
|
||||
build_recipe_template ='<button class="btn btn-block build-recipe-btn" data-recipe-name="{{data.name}}" {%if extra.in_prj == 0 %}disabled="disabled"{%endif%}>Build recipe</button>'
|
||||
|
||||
self.add_column(title="Build recipe",
|
||||
static_data_name="add-del-layers",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<a href="{% url 'project' extra.pid %}#/targetbuild={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.pk}}" style="display:none; margin-top: 5px;" >
|
||||
<button data-recipe-name="{{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.pk}} build-recipe-btn" style="display:none; margin-top: 5px;" >
|
||||
Build recipe
|
||||
</a>
|
||||
</button>
|
||||
<button class="btn btn-block layerbtn layer-add-{{data.layer_version.pk}}" data-layer='{ "id": {{data.layer_version.pk}}, "name": "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.pk%}"}' data-directive="add">
|
||||
<i class="icon-plus"></i>
|
||||
Add layer
|
||||
|
||||
Reference in New Issue
Block a user