Commit Graph

39 Commits

Author SHA1 Message Date
Paul Eggleton
15d1253f79 Drop old raw recipe export code
We're about to replace this with a proper CSV export function, so we
don't need this dead code hanging around anymore.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-07 12:01:12 +12:00
Paul Eggleton
13a15cf3e5 urls: add required exception parameter for page_not_found
Django 1.9+ requires an exception parameter for the page_not_found view.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-04-24 10:15:47 +12:00
Paul Eggleton
5cf6ef57b7 urls*: Use new urlpatterns list syntax
The patterns() function is deprecated in Django 1.8 and gone in 1.10, so
we should switch over to the new list format.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-04-24 10:15:47 +12:00
Paul Eggleton
a918098981 Stop using string name for publish view in urls.py
Rename publish() to publish_view() and call it directly from the view
rather than using a string name (which is not possible in Django 1.10+).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-04-24 10:15:47 +12:00
Paul Eggleton
bed43a9be5 Add statistics page
Add a page with basic statistics for the index - number of layers,
recipes, classes, machines and distros on an overall basis (distinct
names) and per branch, since I've been asked a few times for this kind
of information. It's currently only linked from the Tools menu for
logged-in users, but the URL will work for anyone.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-20 16:00:13 +13:00
Paul Eggleton
f5922091b4 Fix router pointing layerBranches URL to new layers view
For reasons that are not immediately clear to me, if you don't specify a
name when adding the ViewSet it takes one from the model used in the
queryset in the ViewSet. The new layers view uses LayerBranch and so it
silently replaced the layerBranches URL in the router, even though the
URL itself was still present. Unfortunately that's broken Toaster.
Specify a name to restore the old URL.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-02-15 14:08:20 +13:00
Paul Eggleton
f6ab721ea0 restviews: add additional layer view with extra nested fields
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-07 11:27:48 +13:00
Paul Eggleton
c01b4120bf restviews: add access to layer maintainers and notes via REST API
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-07 11:27:14 +13:00
Amanda Brindle
78c2561181 templates/layerindex/classes.html: Add bbclass search
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-11-07 16:54:46 +13:00
Paul Eggleton
43203c578c Record and display update logs
At the moment it's a bit difficult to get update logs out of the
environment in which the update script is being run. In order to make
the logs more accessible, create a LayerUpdate model to record the
output of update_layer.py separately for each layerbranch and tie the
created LayerUpdates together with a single Update model per session.

We provide two ways to look at this - a Tools->Updates page for
logged-in users, and there's also an "Updates" tab on each layer that is
accessible to anyone; which one is useful depends on whether you are
looking at the index as a whole or an individual layer.

Update records older than 30 days are deleted automatically by default.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-11-16 15:31:46 +13:00
Liam R. Howlett
31c85196d0 layerindex: Add distro to web interface and model
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-10-18 16:42:15 +13:00
Paul Eggleton
4d6894ccbb Explicitly specify temporary redirection
Django 1.8 warns that the default for the "permanent" parameter to
RedirectView is changing in 1.9 from True to False, but I believe we
should be specifying False for these redirections - these are not just
redirections from old URLs and may in fact change in the future if the
site structure changes.

Part of the implementation for [YOCTO #9620].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Paul Eggleton
29c6458dca Support (and require) Python 3
We need to be able to support Python 3 so that we can parse master of
OE-Core with bitbake (which now requires it). This now means the
interface itself and the update script require Python 3.4+.

Part of the implementation for [YOCTO #9704].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Paul Eggleton
82c632ca2d Upgrade to Django 1.6+
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>
2016-06-12 11:33:08 +12:00
Alexandru DAMIAN
1c9d6be527 expose REST API for layerindex
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>
2014-09-24 11:32:34 +01:00
Paul Eggleton
91a0bbea06 Disable rawrecipes URL
It's not really completely functional and puts quite a bit of load on
the server when used, so just disable it for now.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-05 00:31:23 +01:00
Paul Eggleton
1643aef67d Navigation improvements
* Drop the front page - this just gets in the way. Redirect to the
  layers list instead. This has meant adding a touch more text to the
  about page and adding the FAQ link to the footer.
* Use a separate navbar to hold the branch selector and the main
  top-level  pages (Layers, Recipes, Machines) instead of tabs
* All pages depending on a branch selection are now under
  branch/<branchname>/ so we don't need to have the branch selection on
  every page.
* Use breadcrumbs on recipe detail and layer detail pages instead of
  tabs
* Add title to recipe detail page

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-05 00:31:23 +01:00
Paul Eggleton
c3a8eb4d82 Add support for importing OE-Classic recipes
Add a script for doing a one-time import of OE-Classic recipe
information, so comparisons against OE-Core can be performed; this
is stored using a new ClassicRecipe model supporting additional fields
for tracking migration status. The migration status fields can be
updated as well as viewed and summarised in graph format.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-05 00:31:22 +01:00
Paul Eggleton
571e85416a Show appends in recipe detail
Show the appends in other layers that apply to the recipe.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:15 +01:00
Paul Eggleton
84709dbca6 Add recipe bulk change feature
This provides a way to set "meta" fields (SUMMARY, DESCRIPTION,
HOMEPAGE, BUGTRACKER, SECTION, and LICENSE) for a number of recipes at
once, and then download those changes in the form of one or more patch
files which can be submitted for merging into the layer.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
89f9e6afe8 Add duplicate recipes/classes page
Add page that lists recipes and classes "duplicated" across different
layers.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-17 21:11:58 +01:00
Paul Eggleton
4502a38946 Add user profile editing form
This form allows the user to change their email address, first and last
name.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-22 17:45:36 +01:00
Paul Eggleton
df9a1040c2 Fix error when requesting raw recipes list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-07 12:13:14 +01:00
Paul Eggleton
ce1775db31 Add basic change history page
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-31 20:38:30 +01:00
Paul Eggleton
ee9176a8c5 Ensure bad URL within layerindex app returns 404
The recently added global redirect was also redirecting incorrect URLs
within the application to the front page rather than showing 404, which
is not desirable.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-18 16:29:50 +00:00
Paul Eggleton
4faeab6595 Add introductory front page
Give the user a friendly introduction instead of plunging them straight
into the layers list. (Of course if people want to link directly to the
layers list they still can.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:13:49 +00:00
Paul Eggleton
a643aeba33 Add separate templates for review list and detail
This cuts out a lot of the elements that aren't needed for the review
list, shows fields in a more suitable way for review purposes than the
standard detail (and includes some fields that don't currently get shown
on the standard detail e.g. layer type and short description).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:13:44 +00:00
Paul Eggleton
0c7dcedca6 Use TemplateView for simple views instead of custom functions
The simple views for about and the submit thanks pages don't need
special views, so the standard TemplateView can be used.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 16:55:28 +00:00
Paul Eggleton
354e368aa2 Add support for handling multiple branches
Change the data structure to support multiple branches. At the top level
there is a set list of Branch objects, and then a LayerBranch object
between each layer and the maintainers, dependencies, recipes and
machines, so that the set of each can be different per branch. The
branch is a session option, and can be selected via a drop-down that is
shown for all pages.

Additionally, with this change we avoid the need to run the update
script within a build environment set up with oe-init-build-env - since
we need a specific version of BitBake per branch we now use our own copy
of BitBake which is fetched by the script itself. The update script will
need to be called multiple times however - once per branch.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05 20:37:48 +00:00
Paul Eggleton
2ad289e312 Fix static pathing to use staticfiles
This is the recommended best practice.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 16:58:07 +00:00
Paul Eggleton
9a3bfac320 Add ability to delete unpublished layers
If we get bogus or duplicate entries we'll want the ability to delete
them easily before publishing (without needing to have access to the
admin interface), so add this ability. Being able to delete a published
layer might be a bit dangerous and is less likely to be needed so that
is disallowed for now.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
26ab9dbb28 Add ability to add, edit and delete layer notes
This allows adding an important notice to a layer e.g. "this layer is
deprecated, please use layer xyz instead". Only one layer note can be
added through the interface although the data structures allow multiple,
so notes may be added programmatically without disturbing user-added
ones.

With this change we also add a get_absolute_url() function to the
LayerItem model and change the calls to reverse() for layers to use it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +00:00
Paul Eggleton
c40bfedd4a Implement editing of layers
Allow users with publish permission to edit any layer, and users with
the same email address as one of the maintainers of a layer to edit that
layer.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 10:34:02 +00:00
Paul Eggleton
88ada21861 Prevent users without publish permission from viewing unpublished layers
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 22:36:39 +00:00
Paul Eggleton
440a972f60 Add searchable machine index
The number of machines is likely to be quite high and it may not be
immediately clear to users which layer machines can be found in, so add
a searchable index to help with this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 17:51:16 +00:00
Paul Eggleton
f6c10424e4 Add OE favicon
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-25 12:07:33 +00:00
Paul Eggleton
ea213c8007 Add a basic about page
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-20 11:20:11 +00:00
Paul Eggleton
fd600fb716 Initial version of recipe detail page
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-19 17:22:40 +00:00
Paul Eggleton
2eb5f38b21 Initial commit of layerindex-web
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-13 12:09:57 +00:00