Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 612C8E00890; Thu, 8 Dec 2016 10:43:01 -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.46 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-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id DE84EE00546 for ; Thu, 8 Dec 2016 10:42:59 -0800 (PST) Received: by mail-wm0-f46.google.com with SMTP id f82so39676722wmf.1 for ; Thu, 08 Dec 2016 10:42: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=P3l1pj4rDBHhaa42A3cJju1guh5HtA0ibGz/4iE67tnVdLG6W/TGzYq4/FQjCJja+j He2z4BsiFOAjJj589C5dYRNQTewGq1Gbq+qIVovDL4DSTItMHTkhy1YwUJCVWtM7M6SS eNkkI4mZoTf1VBSaSgJ5H+T0vf9b9KGWqwczOsgR1HGvaqEUVbq1oD0NOCb2Y4tkm3Ww Z6iS0gBKkhtLjvLS+mtoDuxTAQVfvsvIpfYSi2dyvOizCywEgJeE6EtKQpzppKTvAnPs aUHqId2Gy14b2z+HhbQU3G6uiFkVSSPHAw9NKwVbdmWQsB57Y/1D34my6DRE44Vfbk+0 pdtw== 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=HarWzid/tcaAd6znK+O90/tVipa1xdJxyonwX03NqfegvF/wwI+rd7Q3NxNu0yGuyD aHAuOUBpeU8ygvvVz7X9yh3xwDBlKdGYuspVP6LKFh5oturZFe/EIN/vUOD4VYzie5RB /SLA/mhX8vhBrDL7bX8Sl3l4azy4GPwDLnuwPd9YeyFYh0bbrGdGIY6gX8iVsTnGOQdD iKY0sOevn0SHYT629UMMDTRU3EmZhsYq8otU9P2PtEgy9EIXq+ybXY1dE5SM0zxrGt28 aDX0PUXK4loNG9qsS+gOy3+4fZAdx4IuYqK0UFBwjRXJPchKxiol8VsF6nO1G+SD8fQD hfhA== X-Gm-Message-State: AKaTC01ZZUFSdowFgmTmeTMJnu+O75gJrc+WwvheRyhwO8qMiZk6Dn3K9D2kKx3SzuejfGsw X-Received: by 10.28.216.9 with SMTP id p9mr3379552wmg.11.1481222578072; Thu, 08 Dec 2016 10:42:58 -0800 (PST) Received: from localhost.localdomain ([192.198.151.62]) by smtp.gmail.com with ESMTPSA id d64sm16637008wmh.3.2016.12.08.10.42.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Dec 2016 10:42:57 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 8 Dec 2016 18:42:48 +0000 Message-Id: <1481222571-17651-3-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481222571-17651-1-git-send-email-michael.g.wood@intel.com> References: <1481222571-17651-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 2/5] 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: Thu, 08 Dec 2016 18:43:01 -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