Commit Graph

134 Commits

Author SHA1 Message Date
Paul Eggleton
1eebd6e525 Implement locking for update/bulkchange process
Avoid the possibility of these two clashing especially when multiple
branches are being used.

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
97361ae37e Make machine search consistent with recipe search
Don't start with all records being shown - only do this if the search
button is pressed with no keyword.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-09-05 00:31:22 +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
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
4185d5c2d3 Update bootstrap to latest version (2.3.0)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:15 +01:00
Paul Eggleton
608851b2d3 Login drop-down style improvements
Thanks to Belen for the design.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-08-11 11:28:15 +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
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
9156b1c0de Enable messages framework and use it to display "layer saved" message
The Django messages framework is the proper way to handle these kinds of
messages.

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
1a9f73d4a7 Split out recipe parsing and utility functions to a separate module
To allow re-use outside of the update script, split out parsing setup
code to a new recipeparse module. Also split out runcmd, get_layer,
get_branch and logger_create functions to a separate utils module.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-07-28 18:43:11 +01:00
Paul Eggleton
8be1adddb6 Add actual_branch field to layerbranch
Some layers don't use the conventional branch name (i.e. the same name
as the core branch). Add a field so we can record the actual branch name
and use this within the update script.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-17 21:11:58 +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
339ee8e043 Enable south and add initial migrations
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
5a07f0422d update.py: add --nocheckout option
This allows disabling the checkout of the appropriate branch so that we
can test the update script with fixes to bitbake or the metadata if
needed.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-22 17:45:36 +01:00
Paul Eggleton
eaa7e4a8d7 Use user's first name or login name in review email
It's not really appropriate to say "Hi Joe Bloggs" at the start of the
email - we only need the user's first name or the login name if the
first name hasn't been filled in.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-22 17:45:36 +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
611ed1dece update.py: handle change to cooker structure in newer BitBake
The cooker module has been refactored in BitBake master and this moved
and renamed the _parse() function; change the update script to handle
that (whilst still handling older versions).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-22 17:42:25 +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
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
9df79fe0ef Sort recipes by PN and descending PV in layer list
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-07 12:13:14 +01:00
Paul Eggleton
c257348c5a detail: ensure machine list is sorted by name
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-04-05 18:35:35 +01:00
Paul Eggleton
b3a8b19eb4 models: add layer name to string representation of layer note
This includes the layer name in layer note additions/changes in the
history page, among other places.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-04-02 12:25:26 +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
6ec84fb7f5 editlayer: fix checkboxes not showing up in Chromium
Somehow due to some CSS shenanigans these checkboxes had 0 width in
Chromium and thus were invisible. A style on the td had to be used
because a style on the input doesn't seem to fix it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-30 08:42:05 +00:00
Paul Eggleton
979fb7980d Fix "AnonymousUser has no attribute 'email'" errors when not logged in
We shouldn't be looking for this attribute unless the user has logged in
- this was a regression in the recent email case fix.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-28 21:39:00 +00:00
Paul Eggleton
665e40e2c5 Ensure user_can_edit email address check ignores case and spaces
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-28 12:10:28 +00:00
Paul Eggleton
f7b2bd71b1 Redirect to login page for review list/detail views if not logged in
This avoids showing a 403 error when a user clicks on a review link in
the layer submission notification email but hasn't logged in yet.

Also protect the review list view with a permission check; it's not that
it's sensitive, but we should be consistent with the detail here.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-28 10:03:46 +00:00
Paul Eggleton
333ee2a94e Improved fix for ../ in usage URL
This actually works for complex URLs since we normalise just the path
portion that we are adding instead of trying it on the URL after
composing it.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 16:17:49 +00:00
Paul Eggleton
2804211f8f Fix web subdirectory links with gitweb
gitweb, ever vigilant for the slightest transgression in URL syntax,
fails to find the specified path if it is a directory and has a trailing
slash, so we need to avoid adding this.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 16:02:28 +00:00
Paul Eggleton
cd7e00bf57 Allow ../ in usage URL field
Allow using e.g. ../README to point to README file in the parent of the
repository subdirectory.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 16:01:24 +00:00
Paul Eggleton
a7323361ff Bump up some of the field lengths
Avoid truncation for slightly longer fields (as happened with PN and
SUMMARY when importing some existing layers).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-27 09:34:56 +00:00
Paul Eggleton
1c73d63333 update.py: fix scanning for machine files
* Avoid picking up machine files in sub-layers
* Skip scanning of .git directory when doing full refresh

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 18:01:02 +00:00
Paul Eggleton
e1bbc39237 update.py: improve handling of machine descriptions
Fall back to NAME if DESCRIPTION is not specified and remove more
preamble from the string.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 17:21:29 +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
42d710b640 update.py: set log level earlier
Ensure that we're not printing info messages when the -q option is
specified.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 17:04:56 +00:00
Paul Eggleton
9cec14c8a9 update.py: make failure to parse a recipe an error
Ensure that these are still printed when the -q option is used.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 17:04:56 +00:00
Paul Eggleton
473c47a222 Ensure entire layer gets refreshed on next update if repo fields change
If the user edits the layer and changes the repository URL,
subdirectory, or dependencies, ensure that the entire layer gets
refreshed the next time the update script runs by clearing out the last
fetched revision field.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 16:21:41 +00:00
Paul Eggleton
af920d10c9 update.py: set PN for recipe even if we fail to parse it
This ensures recipes that failed to parse sort properly instead of all
appearing at the start of the search results.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 16:21:41 +00:00
Paul Eggleton
98eed250bc update.py: ensure TMPDIR gets created before starting parse
We don't go through the normal code path where this directory would be
created, and if it doesn't exist an error will be thrown in
insane.bbclass when any QA issue is logged; so create it manually.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00
Paul Eggleton
65d3f55925 update.py: explicitly check for existence of conf/layer.conf
Rather than letting BitBake error out, just check for existence of this
file and print a single error line if it doesn't exist.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20 15:41:58 +00:00