From: Michael Wood Date: Fri, 9 Dec 2016 16:52:52 +0000 (+0000) Subject: bitbake: toaster: typeaheads Layers add url to layer REST API to the layer X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ccb36cc5499b9f3d93b44f629aff4e3cc0ba4f1c;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: typeaheads Layers add url to layer REST API to the layer Add the url to the Layer typeahead so that this can be used later on by the front end code to look up layer details. (Bitbake rev: d195f24a1b30ae8698bff5e87308347b9596a2e2) Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/toastergui/typeaheads.py b/bitbake/lib/toaster/toastergui/typeaheads.py index 53160002093..58c650f8fcc 100644 --- a/bitbake/lib/toaster/toastergui/typeaheads.py +++ b/bitbake/lib/toaster/toastergui/typeaheads.py @@ -23,6 +23,7 @@ from orm.models import Project from django.core.urlresolvers import reverse from django.core.cache import cache + class LayersTypeAhead(ToasterTypeAhead): """ Typeahead for layers available and not added in the current project's configuration """ @@ -55,6 +56,8 @@ class LayersTypeAhead(ToasterTypeAhead): 'id': layer_version.pk, 'name': layer_version.layer.name, 'layerdetailurl': layer_version.get_detailspage_url(prj.pk), + 'xhrLayerUrl': reverse('xhr_layer', + args=(prj.pk, layer_version.pk)), 'vcs_url': layer_version.layer.vcs_url, 'vcs_reference': vcs_reference, 'detail': detail,