Commit Graph

49 Commits

Author SHA1 Message Date
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
Diana Thayer
2e671480c7 Asynchronous email notifications, task execution
This patch adds asynchronous task execution using a Celery backend
and RabbitMQ task queue, so that the layer submission process to
proceed even in the event that sending the notification email fails,
and establishing an asynchronous execution mechanism that we can use
in the future e.g. for triggering parse operations from the web UI.
This pertains to bug 11197:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=11197

It updates the README to reflect the installation and configuration
of a basic RabbitMQ setup, adds a 'tasks.py' file to contain task
definitions, updates the 'edit_layer_view' function to send
emails to administrators about new and updated layers asynchronously,
modifies the 'settings.py' to include a default configuration
for a RabbitMQ connection, and updates the Dockerfile to start a Celery
worker alongside the Gunicorn daemon.

Fixes [YOCTO #11197].

Signed-off-by: Diana Thayer <garbados@gmail.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-09-01 16:59:43 +12:00
Paul Eggleton
8dfe44ed5e TODO: drop implemented items
Drop a couple of items that got implemented recently.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-03-22 14:21:22 +13:00
Paul Eggleton
cb656bdd31 Sort higher preference layers first in layer list
On the main layer index page we want openembedded-core to appear before
meta-oe - naturally openembedded-core is the layer everyone starts from.
We already have an "index_preference" column that we use for search
results, so just sort by that here before sorting by name.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-01-16 14:27:06 +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
Paul Eggleton
18d8267da3 Increase size of Recipe provides and license fields
Fix "data truncated" warnings/errors when loading data for OE-Core:
* PROVIDES for recipe packagegroup-base is ~1452 characters
* LICENSE for recipe linux-firmware is ~1053 characters

(These aren't shown with SQLite, only with something like MariaDB where
column sizes are enforced.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Paul Eggleton
3bf78e6c37 Fix listing *_git.bbappend as appends for git recipe
Fix a greedy regex in the recipe detail view resulting in the git recipe
listing all bbappends named *_git.bbappend as its bbappends (quite a few
in the public instance).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00
Paul Eggleton
b80833e1c9 TODO: drop some completed items
We took care of showing blacklist info and searching for the git recipe
recently. We've used "git fetch" rather than "git pull" for some time
now so we won't be hitting merge situations.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-05-30 15:28:20 +12:00
Paul Eggleton
cad4d3df16 Update TODO with more ideas
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-10-22 10:40:25 +01:00
Paul Eggleton
4c08b28387 recipes: preserve search keyword when switching between branches
If you want to check what the same search returns on a different branch
it makes things easier if you don't have to re-type the search after
selecting the branch.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-03-09 21:16:08 +00:00
Paul Eggleton
5ee1bb255b TODO: Add some more todo items
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-02-23 02:14:13 +00:00
Paul Eggleton
482e7c437f TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-20 07:03:30 +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
1c70da817b Force scrollbar to always show to prevent page width changing
Having the page content dance about when switching between pages just
because one has a scrollbar and the other doesn't is annoying, so just
force the scrollbar to show all of the time to avoid this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:15 +01:00
Paul Eggleton
3dfca5a250 layers: leave drop-down filter box open when ticking/unticking items
This allows users to easily tick and untick several items at once
without having to drop the filter box down multiple times. Thanks to
Belen for this snippet.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:15 +01:00
Paul Eggleton
4ec2431fe3 Move layers import script to tools subdirectory
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
e36280922a update.py: preserve recipe id when updating
The recipe detail pages use the recipe record id, so in case users
bookmark links to these pages, try to preserve the id when a recipe
upgrade occurs (which usually shows up as a delete and an add). This
also works when doing a full update with -r so that we can capture the
newly recorded items (bbclasses, bbappends) without having all the
recipe id values change.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
5166582791 Add cancel button to edit layer form
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +01:00
Paul Eggleton
33f433c1d2 Return to appropriate page when saving a layer
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:14 +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
9af1144928 Collect bbappends and bbclasses for each layer
Collect bbappend/bbclass info during the update process and display it
on the layer detail page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-17 21:11:53 +01:00
Paul Eggleton
38e8791c21 Collect BUGTRACKER, PROVIDES and BBCLASSEXTEND for each recipe
* Show BUGTRACKER in the recipe detail page if set
* Track the other two variables for possible future use

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-03 10:59:10 +01:00
Paul Eggleton
e72a33e16a Add preference order field
Add an index_preference field to enable control over which layer's
duplicate recipes get de-emphasised in the recipe search results.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-03 10:59:10 +01:00
Paul Eggleton
d1b875a76b Improve history collection and add link to history page
Save individual field changes into revision comment and display this
comment on the history page. Now we're ready to add a link at the
bottom of every page so the history is easily visible.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-03 10:59:10 +01:00
Paul Eggleton
a490f057d6 update.py: improve fetch failure handling
* Report layer which failed to fetch in error message
* Don't retry fetching a repo if it already failed for another layer
  (where more than one layer is in the same repository)
* Exit immediately if all fetches failed

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08 22:52:09 +01:00
Paul Eggleton
714bc8e39f update.py: error out with unexpected arguments
It's easy to forget you need to use -l to specify the list of layers to
update and previously we just ignored unused arguments, so check for
them and error out if present.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08 22:01:25 +01:00
Paul Eggleton
25f4acaa46 TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08 11:59:09 +01:00
Paul Eggleton
2428077170 TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-28 18:43:11 +00:00
Paul Eggleton
342ff28648 De-emphasise recipes where there is a more preferred version available
If another recipe exists with the same name in a different layer and
that other layer is "older" (by layer ID) and is a software or base
layer then lighten the recipe entry in the search results as it may
not be the preferred version (e.g. recipes in BSP or distro layers may
have been customised specifically for the machine or distro).

This has had a performance impact on the recipes list; as a result
showing all recipes by default has been disabled. If the user really
wants to see all recipes they can just leave the search box blank and
hit the search button.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 17:04:56 +00:00
Paul Eggleton
d2e4f6d322 TODO: update todo list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 20:24:43 +00:00
Paul Eggleton
46e579b6e6 Show count of layers to be reviewed next to Review link
Add a badge next to the Review link (when shown for users with the
publish permission) on all pages showing how many layers need to be
reviewed, if any.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06 09:16:19 +00:00
Paul Eggleton
4b3aad2cea Add CAPTCHA to submission form
This should prevent spamming even though this is less likely with this
kind of site.

The CAPTCHA does not show when editing, only submitting, and is also not
shown for authenticated users.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 15:48:38 +00:00
Belen Barros
f178ea3151 Styles for the submit layers form
Improve styling and layout

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-28 14:36:41 +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
ad5e8f0524 Clarify language around publishing layers
Show "unpublished" rather than "new" in dependencies list in submit
form, and mention publishing as the operation in the "thanks for
submitting" page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-27 23:10:28 +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
4ff01679ce More TODO list updates
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 19:16:35 +00:00
Paul Eggleton
2ea10c869e Add last commit date to layer detail
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26 19:13:34 +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
880081aff3 Update TODO list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-25 11:04:01 +00:00
Paul Eggleton
e4eb8213cf Collect machine information from layers
Look for conf/machine/*.conf and add a record for each file found. These
are displayed in the layer detail page if any are present.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-24 23:14:53 +00:00
Paul Eggleton
08051e1ccf Show layer notes records as alerts on layer detail
These can be used to show important notes (e.g. "This layer is
deprecated, use layer xyz instead.") as eye-catching alerts at the top
of the detail page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-22 17:49:50 +00:00
Belen Barros
18bbce1de9 Layer details style changes
Changed to full screen layout to improve the table display
and get rid of the accordion for the layer information.

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
2013-02-22 17:11:20 +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
f5e37e18c0 Ensure publishing a layer already published does nothing
Just in case two users go to publish the same layer at around the same
time, avoid saving the record for a user who tries to publishes it after
the first time.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-14 07:35:07 +00:00
Paul Eggleton
45514d387b Enable auditing using django-reversion and django-reversion-compare
Collect history for changes, and allow browsing / reverting / comparison
within the admin interface.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-14 07:25:21 +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