aboutsummaryrefslogtreecommitdiffstats
path: root/lib/toaster
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-12-09 16:52:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-12 20:44:47 +0000
commitd195f24a1b30ae8698bff5e87308347b9596a2e2 (patch)
tree6299f210321374b34cd627b5180f4ce03dfef097 /lib/toaster
parent3fa5170c98c699d2a7a8380b696fc599efcc5dee (diff)
downloadbitbake-d195f24a1b30ae8698bff5e87308347b9596a2e2.tar.gz
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. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster')
-rw-r--r--lib/toaster/toastergui/typeaheads.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/toaster/toastergui/typeaheads.py b/lib/toaster/toastergui/typeaheads.py
index 531600020..58c650f8f 100644
--- a/lib/toaster/toastergui/typeaheads.py
+++ b/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,