aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/restviews.py
AgeCommit message (Collapse)Author
2018-02-07restviews: add additional layer view with extra nested fieldsPaul Eggleton
It was a bit awkward to query layers externally - you had to do multiple queries and you couldn't get the YP Compatible version info at all. Add an additional LayerBranch-based view that exposes the branch name, layer fields, YP Compatible Version and active maintainer information with just one call. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-07restviews: add required field definitionsPaul Eggleton
Django REST Framework now requires a field specification for every ModelSerializer, so specify '__all__' to retain the current behaviour. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-07restviews: add access to layer maintainers and notes via REST APIPaul Eggleton
Layer maintainer and layer note information wasn't available through the REST API since it wasn't needed for Toaster, but for other uses it is useful. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-07restviews: explicitly use ReadOnlyModelViewSetPaul Eggleton
The entire API is meant to be read-only, so we should be using this class instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-11-07templates/layerindex/classes.html: Add bbclass searchAmanda Brindle
Add another tab to search for classes. Fixes [YOCTO #11207] Signed-off by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-03-14layerindex: add "No update" status to LayerItemPaul Eggleton
Add a status for a layer indicating it should not be updated. I don't expect this to be widely used (and is only settable from the admin interface) but would be useful if you have a legacy sub-layer that you want to prevent from being visible on certain branches - it will prevent the update script from doing anything with the layer and thus avoid branch records from being auto-created on branches where you've deleted it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-01-18restviews: hide unpublished layersPaul Eggleton
Layers that aren't published shouldn't be visible via the API. (We don't need to apply that filter to recipes, machines or distros though since a layer's content won't automatically be indexed unless it has been published). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-10-18layerindex: Add distro to web interface and modelLiam R. Howlett
Add the distros to the index. This looks a lot like the machines and allows users to search for a particular distro. Signed-off-by: Liam R. Howlett <Liam.Howlett@WindRiver.com> Added associated migration. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2016-06-12Upgrade to Django 1.6+Paul Eggleton
I'd like to be upgrading to 1.8 but that causes problems with South, and we're not quite ready to dispense with our existing migrations yet. Part of the implementation for [YOCTO #9620]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-09-24expose REST API for layerindexAlexandru DAMIAN
This patch enables a read-only REST API for the layerindex application using Django REST Framework. The objects of types Branch, LayerBranch and LayerItem are exposed to queries so that the layerindex application can function as a Layer Source in Toaster. The library dependencies are documented in the requirements.txt file. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>