Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 418B2E00D8D; Fri, 9 Dec 2016 08:30:03 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [74.125.82.48 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 1D134E00D63 for ; Fri, 9 Dec 2016 08:29:59 -0800 (PST) Received: by mail-wm0-f48.google.com with SMTP id f82so32000689wmf.1 for ; Fri, 09 Dec 2016 08:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kLVeg1W8/fCcLWGC7vhs1o+DsiDghF/64L1Xqieu/Ok=; b=vjoQHrI0Y3Pjdzf/gwrGjZ+TYBO+CqL7VPnkClJkIe/A4mbZBtMPm8ZCAjc768PuW6 cAhdfg40gzl8mI/uWad2QxWTgndMutUJn6+JNg6bG1/7Rof9RzChHpSVXx6de4o/AVIw roWkqz1akbPryHQqlnxgb2wB1bRjme7zNj0y3q29CPDSPp15XqMnmSp0Uvk2qwWPcWrM IqImZKnBPGy+OpX+5HafQHTBkk78U7hBKTDJolxvZFunqahf7XMTU8qyWSndUr2z4+kY UEgbp/V8DcdNGm/yH17iGdrR0AyJxbeLU1oat3HBrQqi4tioekrKmES9N+sk0qBt/BEZ VX8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kLVeg1W8/fCcLWGC7vhs1o+DsiDghF/64L1Xqieu/Ok=; b=Fyx+2PRYEZYb13rs/xwS7Mn6IDQix2W+IR2/R7B8yKbbs0ERjGWAVWlOIZd3VG4nmd Oup0goiaMK8hYsMaH92UedVMou2esb79fjNJ9Xuw/UwBGyDT6V8Wr8ibV4Qe3AEwx0kH YaT+c0eW+vml03+f98Tpe08KestrvnAB5u4dFzbCWp1LD+I54/CgB68/ROSwvmw8n82a LU4t2QPaLhtKixsEVYX9H71REQXm0qHK15CJuPFZTeZnn9jC1QowRYfUHf4i5Rsytuzv 3wOcHqeoZZ3Pg7CP6J2Zg87uKtfp4YYrZ/yDwGhDREseBLBX1hkrsOLPffjjKvJhpUEI 35AA== X-Gm-Message-State: AKaTC016NHLVyMH6Uv8CdNLZpgyUGTIQALdrpDLzXaJLTsqghVsxfd8OyIYsFrJVixhF/ec/ X-Received: by 10.28.198.67 with SMTP id w64mr7816363wmf.13.1481300998391; Fri, 09 Dec 2016 08:29:58 -0800 (PST) Received: from localhost.localdomain ([192.198.151.62]) by smtp.gmail.com with ESMTPSA id x5sm43051348wje.36.2016.12.09.08.29.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Dec 2016 08:29:57 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Fri, 9 Dec 2016 16:29:42 +0000 Message-Id: <1481300985-7356-12-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481300985-7356-1-git-send-email-michael.g.wood@intel.com> References: <1481300985-7356-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 11/14] toaster: typeaheads Layers add url to layer REST API to the layer 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, 09 Dec 2016 16:30:03 -0000 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 --- bitbake/lib/toaster/toastergui/typeaheads.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bitbake/lib/toaster/toastergui/typeaheads.py b/bitbake/lib/toaster/toastergui/typeaheads.py index 5316000..58c650f 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, -- 2.7.4